/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @signatureAlgorithm = 'v2';
  @endpointRule = 'regional';
  
  checkConfig(config);
  @endpoint = getEndpoint('vcs', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AiotDevice {
  IPAddr?: string(name='IPAddr'),
  latitude?: float(name='Latitude'),
  longitude?: float(name='Longitude'),
  name?: string(name='Name'),
  place?: string(name='Place'),
  port?: long(name='Port'),
}

model AddAiotDevicesRequest {
  aiotDeviceList?: [ 
    {
      corpId?: string(name='CorpId', example='12345'),
      deviceId?: string(name='DeviceId', example='66666'),
      IPAddr?: string(name='IPAddr', example='127.0.0.1'),
      latitude?: float(name='Latitude', example='23.3'),
      longitude?: float(name='Longitude', example='123.1'),
      name?: string(name='Name'),
      place?: string(name='Place'),
      port?: long(name='Port', example='8080'),
    }
  ](name='AiotDeviceList'),
}

model AddAiotDevicesShrinkRequest {
  aiotDeviceListShrink?: string(name='AiotDeviceList'),
}

model AddAiotDevicesResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', description='Id of the request', example='DDA1CECD-EAC6-5701-BCAF-48195629AE75'),
  resultList?: [ 
    {
      code?: string(name='Code', example='200'),
      deviceId?: string(name='DeviceId', example='12345'),
      id?: string(name='Id', example='1234566666'),
      message?: string(name='Message', example='SUCCESS'),
      password?: string(name='Password', example='admin'),
      serverHost?: string(name='ServerHost', example='pre.regi.com'),
      serverHostInternal?: string(name='ServerHostInternal', example='pre.neibu.regi.com'),
      serverId?: string(name='ServerId', example='4352535235'),
      serverIp?: string(name='ServerIp', example='164.23.23.21'),
      serverIpInternal?: string(name='ServerIpInternal', example='127.0.0.1'),
      serverPort?: string(name='ServerPort', example='30235'),
      serverWssPort?: string(name='ServerWssPort', example='30236'),
      userId?: string(name='UserId', example='12345'),
    }
  ](name='ResultList'),
}

model AddAiotDevicesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddAiotDevicesResponseBody(name='body'),
}

async function addAiotDevicesWithOptions(tmpReq: AddAiotDevicesRequest, runtime: Util.RuntimeOptions): AddAiotDevicesResponse {
  Util.validateModel(tmpReq);
  var request = new AddAiotDevicesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.aiotDeviceList)) {
    request.aiotDeviceListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.aiotDeviceList, 'AiotDeviceList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.aiotDeviceListShrink)) {
    body['AiotDeviceList'] = request.aiotDeviceListShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddAiotDevices',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addAiotDevices(request: AddAiotDevicesRequest): AddAiotDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return addAiotDevicesWithOptions(request, runtime);
}

model AddAiotPersonTableRequest {
  id?: string(name='Id', example='356201295345457780132002021052775030002'),
  personTable?: {
    name?: string(name='Name'),
    personTableId?: string(name='PersonTableId', example='33010800001329000000062022010211025400003'),
    type?: long(name='Type', example='5'),
    verificationModelList?: [ long ](name='VerificationModelList'),
  }(name='PersonTable'),
}

model AddAiotPersonTableResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  personTableId?: string(name='PersonTableId', example='33010800001329000000062022010211025400003'),
  requestId?: string(name='RequestId', description='Id of the request', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
}

model AddAiotPersonTableResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddAiotPersonTableResponseBody(name='body'),
}

async function addAiotPersonTableWithOptions(request: AddAiotPersonTableRequest, runtime: Util.RuntimeOptions): AddAiotPersonTableResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.personTable)) {
    bodyFlat['PersonTable'] = request.personTable;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddAiotPersonTable',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addAiotPersonTable(request: AddAiotPersonTableRequest): AddAiotPersonTableResponse {
  var runtime = new Util.RuntimeOptions{};
  return addAiotPersonTableWithOptions(request, runtime);
}

model AddAiotPersonTableItemsRequest {
  id?: string(name='Id', example='356201295345457780132002021061834860052'),
  personTableId?: string(name='PersonTableId', example='33010800001329000000062021081315521300004'),
  personTableItemList?: [ 
    {
      identificationList?: [ 
        {
          number?: string(name='Number', example='561217893'),
          type?: long(name='Type', example='2'),
        }
      ](name='IdentificationList'),
      identificationNum?: long(name='IdentificationNum', example='1'),
      imageList?: [ 
        {
          data?: string(name='Data', example='ZHNnc2Fnc2Fnc2FnYWdzYWc='),
          deviceId?: string(name='DeviceId', example='2351352151251251'),
          eventSort?: string(name='EventSort', example='1'),
          featureInfo?: {
            algorithmType?: string(name='AlgorithmType', example='1'),
            algorithmVersion?: string(name='AlgorithmVersion', example='ISFRFR259.2.0'),
            featureData?: string(name='FeatureData', example='ZHNnc2Fnc2Fnc2FnYWdzYWdzYWJzYWdocmVxaGVoNDVlMzQ0NjMyaGV3'),
            imageId?: string(name='ImageId', example='742997802162183747870516218374787051561837478705'),
            objectId?: string(name='ObjectId', example='742997802162183747870516218374787051621837478703'),
            tabIed?: string(name='TabIed', example='33010800001329000000062021061016383600004'),
            vendor?: string(name='Vendor', example='bresee'),
          }(name='FeatureInfo'),
          fileFormat?: string(name='FileFormat', example='jpg'),
          height?: long(name='Height', example='1920'),
          imageId?: string(name='ImageId', example='33010800001329000000062021061016383600001'),
          shotTime?: string(name='ShotTime', example='20220123045657'),
          size?: long(name='Size', example='300'),
          storagePath?: string(name='StoragePath', example='http://xxxxx.jpg'),
          type?: string(name='Type', example='1'),
          width?: long(name='Width', example='1080'),
        }
      ](name='ImageList'),
      imageNum?: long(name='ImageNum', example='1'),
      personCode?: string(name='PersonCode', example='232'),
      personId?: string(name='PersonId', example='330440550533044055053304405505330440550512345502'),
      personName?: string(name='PersonName', example='test'),
      remarks?: string(name='Remarks', example='test'),
    }
  ](name='PersonTableItemList'),
}

model AddAiotPersonTableItemsResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', description='Id of the request', example='BB89A409-6D6B-56F8-A8C9-04BA081C530C'),
  resultList?: [ 
    {
      code?: string(name='Code', example='200'),
      message?: string(name='Message', example='SUCCESS'),
      personTableItemId?: string(name='PersonTableItemId', example='330440550533044055053304405505330440550512345509'),
    }
  ](name='ResultList'),
}

model AddAiotPersonTableItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddAiotPersonTableItemsResponseBody(name='body'),
}

async function addAiotPersonTableItemsWithOptions(request: AddAiotPersonTableItemsRequest, runtime: Util.RuntimeOptions): AddAiotPersonTableItemsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.personTableId)) {
    body['PersonTableId'] = request.personTableId;
  }
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.personTableItemList)) {
    bodyFlat['PersonTableItemList'] = request.personTableItemList;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddAiotPersonTableItems',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addAiotPersonTableItems(request: AddAiotPersonTableItemsRequest): AddAiotPersonTableItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return addAiotPersonTableItemsWithOptions(request, runtime);
}

model AddAiotPersonTableItemsForTablesRequest {
  personTableItemList?: [ 
    {
      identificationList?: [ 
        {
          number?: string(name='Number', example='561217893'),
          type?: long(name='Type', example='2'),
        }
      ](name='IdentificationList'),
      identificationNum?: long(name='IdentificationNum', example='1'),
      imageList?: [ 
        {
          data?: string(name='Data', example='ZHNnc2Fnc2Fnc2FnYWdzYWc='),
          deviceId?: string(name='DeviceId', example='2351352151251251'),
          eventSort?: string(name='EventSort', example='1'),
          featureInfo?: {
            algorithmType?: string(name='AlgorithmType', example='1'),
            algorithmVersion?: string(name='AlgorithmVersion', example='ISFRFR259.2.0'),
            featureData?: string(name='FeatureData', example='ZHNnc2Fnc2Fnc2FnYWdzYWdzYWJzYWdocmVxaGVoNDVlMzQ0NjMyaGV3'),
            imageId?: string(name='ImageId', example='742997802162183747870516218374787051561837478705'),
            objectId?: string(name='ObjectId', example='742997802162183747870516218374787051621837478703'),
            tabIed?: string(name='TabIed', example='33010800001329000000062021061016383600004'),
            vendor?: string(name='Vendor', example='bresee'),
          }(name='FeatureInfo'),
          fileFormat?: string(name='FileFormat', example='jpg'),
          height?: long(name='Height', example='1080'),
          imageId?: string(name='ImageId', example='33010800001329000000062021061016383600001'),
          shotTime?: string(name='ShotTime', example='20220123045657'),
          size?: long(name='Size', example='300'),
          storagePath?: string(name='StoragePath', example='http://xxxxx.jpg'),
          type?: string(name='Type', example='1'),
          width?: long(name='Width', example='1920'),
        }
      ](name='ImageList'),
      imageNum?: long(name='ImageNum', example='1'),
      personCode?: string(name='PersonCode', example='232'),
      personId?: string(name='PersonId', example='330440550533044055053304405505330440550512345502'),
      personName?: string(name='PersonName', example='test'),
      remarks?: string(name='Remarks', example='test'),
    }
  ](name='PersonTableItemList'),
  personTableList?: [ 
    {
      id?: string(name='Id', example='356201295345457780132002021061834860052'),
      personTableId?: string(name='PersonTableId', example='33010800001329000000062021081315521300004'),
    }
  ](name='PersonTableList'),
}

model AddAiotPersonTableItemsForTablesResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', description='Id of the request', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model AddAiotPersonTableItemsForTablesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddAiotPersonTableItemsForTablesResponseBody(name='body'),
}

async function addAiotPersonTableItemsForTablesWithOptions(request: AddAiotPersonTableItemsForTablesRequest, runtime: Util.RuntimeOptions): AddAiotPersonTableItemsForTablesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.personTableItemList)) {
    bodyFlat['PersonTableItemList'] = request.personTableItemList;
  }
  if (!Util.isUnset(request.personTableList)) {
    bodyFlat['PersonTableList'] = request.personTableList;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddAiotPersonTableItemsForTables',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addAiotPersonTableItemsForTables(request: AddAiotPersonTableItemsForTablesRequest): AddAiotPersonTableItemsForTablesResponse {
  var runtime = new Util.RuntimeOptions{};
  return addAiotPersonTableItemsForTablesWithOptions(request, runtime);
}

model AddAiotVehicleTableItemsRequest {
  id?: string(name='Id', example='356201295345457780132002021051835800505'),
  vehicleTableId?: string(name='VehicleTableId', example='1'),
  vehicleTableItem?: {
    beginTime?: string(name='BeginTime', example='20201230083000'),
    endTime?: string(name='EndTime', example='20211230083000'),
    ownerName?: string(name='OwnerName'),
    phoneNo?: string(name='PhoneNo', example='181****5023'),
    plateNo?: string(name='PlateNo'),
    remarks?: string(name='Remarks'),
    vehicleTableItemId?: string(name='VehicleTableItemId'),
  }(name='VehicleTableItem'),
}

model AddAiotVehicleTableItemsShrinkRequest {
  id?: string(name='Id', example='356201295345457780132002021051835800505'),
  vehicleTableId?: string(name='VehicleTableId', example='1'),
  vehicleTableItemShrink?: string(name='VehicleTableItem'),
}

model AddAiotVehicleTableItemsResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='0E1DF0A4-4103-517A-961B-4FAA11A4749E'),
}

model AddAiotVehicleTableItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddAiotVehicleTableItemsResponseBody(name='body'),
}

async function addAiotVehicleTableItemsWithOptions(tmpReq: AddAiotVehicleTableItemsRequest, runtime: Util.RuntimeOptions): AddAiotVehicleTableItemsResponse {
  Util.validateModel(tmpReq);
  var request = new AddAiotVehicleTableItemsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.vehicleTableItem)) {
    request.vehicleTableItemShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.vehicleTableItem, 'VehicleTableItem', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.vehicleTableId)) {
    body['VehicleTableId'] = request.vehicleTableId;
  }
  if (!Util.isUnset(request.vehicleTableItemShrink)) {
    body['VehicleTableItem'] = request.vehicleTableItemShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddAiotVehicleTableItems',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addAiotVehicleTableItems(request: AddAiotVehicleTableItemsRequest): AddAiotVehicleTableItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return addAiotVehicleTableItemsWithOptions(request, runtime);
}

model AddCameraForInstanceRequest {
  cameraIds?: [ string ](name='CameraIds'),
  instanceId?: string(name='InstanceId', example='1001****'),
}

model AddCameraForInstanceShrinkRequest {
  cameraIdsShrink?: string(name='CameraIds'),
  instanceId?: string(name='InstanceId', example='1001****'),
}

model AddCameraForInstanceResponseBody = {
  code?: string(name='Code', example='0'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model AddCameraForInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddCameraForInstanceResponseBody(name='body'),
}

async function addCameraForInstanceWithOptions(tmpReq: AddCameraForInstanceRequest, runtime: Util.RuntimeOptions): AddCameraForInstanceResponse {
  Util.validateModel(tmpReq);
  var request = new AddCameraForInstanceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.cameraIds)) {
    request.cameraIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.cameraIds, 'CameraIds', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.cameraIdsShrink)) {
    body['CameraIds'] = request.cameraIdsShrink;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddCameraForInstance',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addCameraForInstance(request: AddCameraForInstanceRequest): AddCameraForInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return addCameraForInstanceWithOptions(request, runtime);
}

model AddChannelRequest {
  parentDeviceGbId?: string(name='ParentDeviceGbId', example='352532523523352'),
}

model AddChannelResponseBody = {
  code?: string(name='Code', example='200'),
  data?: string(name='Data', example='4632623623'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', description='Id of the request', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
}

model AddChannelResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddChannelResponseBody(name='body'),
}

async function addChannelWithOptions(request: AddChannelRequest, runtime: Util.RuntimeOptions): AddChannelResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.parentDeviceGbId)) {
    body['ParentDeviceGbId'] = request.parentDeviceGbId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddChannel',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addChannel(request: AddChannelRequest): AddChannelResponse {
  var runtime = new Util.RuntimeOptions{};
  return addChannelWithOptions(request, runtime);
}

model AddDataSourceRequest {
  corpId?: string(name='CorpId', example='252060345870948812*'),
  dataSourceName?: string(name='DataSourceName', example='PicDataSource'),
  dataSourceType?: string(name='DataSourceType', example='VIDEO'),
  description?: string(name='Description', example='DataSource for aliyun'),
  url?: string(name='Url', example='http://.......'),
}

model AddDataSourceResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    dataSourceId?: string(name='DataSourceId', example='ds_ddd12345675_1594196239688'),
    kafkaTopic?: string(name='KafkaTopic', example='audio_algo1585959481645918'),
    ossPath?: string(name='OssPath', example='audio_algo1585959481645918'),
  }(name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='asbde-wefcse'),
}

model AddDataSourceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddDataSourceResponseBody(name='body'),
}

async function addDataSourceWithOptions(request: AddDataSourceRequest, runtime: Util.RuntimeOptions): AddDataSourceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.dataSourceName)) {
    body['DataSourceName'] = request.dataSourceName;
  }
  if (!Util.isUnset(request.dataSourceType)) {
    body['DataSourceType'] = request.dataSourceType;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.url)) {
    body['Url'] = request.url;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddDataSource',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addDataSource(request: AddDataSourceRequest): AddDataSourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return addDataSourceWithOptions(request, runtime);
}

model AddDeviceRequest {
  bitRate?: string(name='BitRate', example='4M'),
  corpId?: string(name='CorpId', example='100001'),
  deviceAddress?: string(name='DeviceAddress'),
  deviceDirection?: string(name='DeviceDirection'),
  deviceName?: string(name='DeviceName'),
  deviceResolution?: string(name='DeviceResolution', example='1080P'),
  deviceSite?: string(name='DeviceSite'),
  deviceType?: string(name='DeviceType', example='IPC'),
  gbId?: string(name='GbId', example='1101050001132700****'),
  vendor?: string(name='Vendor'),
}

model AddDeviceResponseBody = {
  code?: string(name='Code', example='200'),
  data?: string(name='Data', example='success'),
  message?: string(name='Message', example='sucess'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model AddDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddDeviceResponseBody(name='body'),
}

async function addDeviceWithOptions(request: AddDeviceRequest, runtime: Util.RuntimeOptions): AddDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bitRate)) {
    body['BitRate'] = request.bitRate;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.deviceAddress)) {
    body['DeviceAddress'] = request.deviceAddress;
  }
  if (!Util.isUnset(request.deviceDirection)) {
    body['DeviceDirection'] = request.deviceDirection;
  }
  if (!Util.isUnset(request.deviceName)) {
    body['DeviceName'] = request.deviceName;
  }
  if (!Util.isUnset(request.deviceResolution)) {
    body['DeviceResolution'] = request.deviceResolution;
  }
  if (!Util.isUnset(request.deviceSite)) {
    body['DeviceSite'] = request.deviceSite;
  }
  if (!Util.isUnset(request.deviceType)) {
    body['DeviceType'] = request.deviceType;
  }
  if (!Util.isUnset(request.gbId)) {
    body['GbId'] = request.gbId;
  }
  if (!Util.isUnset(request.vendor)) {
    body['Vendor'] = request.vendor;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addDevice(request: AddDeviceRequest): AddDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return addDeviceWithOptions(request, runtime);
}

model AddDoubleVerificationGroupsRequest {
  doubleVerificationGroupList?: [ 
    {
      groupId?: string(name='GroupId', example='12344'),
      interval?: long(name='Interval', example='10'),
      memberNumber?: long(name='MemberNumber', example='1'),
      personIdList?: [ 
        {
          personId?: string(name='PersonId', example='2523525125425325'),
          personTableId?: string(name='PersonTableId', example='432523523523523'),
        }
      ](name='PersonIdList'),
    }
  ](name='DoubleVerificationGroupList'),
  id?: string(name='Id', example='356201295345457780132002021072379520015'),
}

model AddDoubleVerificationGroupsResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', description='Id of the request', example='7059033C-3352-502B-B9E8-39D270CCE71F'),
  resultList?: [ 
    {
      code?: string(name='Code', example='200'),
      groupId?: string(name='GroupId', example='12344'),
      message?: string(name='Message', example='SUCCESS'),
    }
  ](name='ResultList'),
}

model AddDoubleVerificationGroupsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddDoubleVerificationGroupsResponseBody(name='body'),
}

async function addDoubleVerificationGroupsWithOptions(request: AddDoubleVerificationGroupsRequest, runtime: Util.RuntimeOptions): AddDoubleVerificationGroupsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.doubleVerificationGroupList)) {
    bodyFlat['DoubleVerificationGroupList'] = request.doubleVerificationGroupList;
  }
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddDoubleVerificationGroups',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addDoubleVerificationGroups(request: AddDoubleVerificationGroupsRequest): AddDoubleVerificationGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return addDoubleVerificationGroupsWithOptions(request, runtime);
}

model AddMonitorRequest {
  algorithmVendor?: string(name='AlgorithmVendor', example='damo'),
  batchIndicator?: int32(name='BatchIndicator', example='0'),
  corpId?: string(name='CorpId', example='10001'),
  description?: string(name='Description'),
  monitorType?: string(name='MonitorType', example='face'),
  notifierAppSecret?: string(name='NotifierAppSecret'),
  notifierExtendValues?: string(name='NotifierExtendValues'),
  notifierTimeOut?: int32(name='NotifierTimeOut'),
  notifierType?: string(name='NotifierType'),
  notifierUrl?: string(name='NotifierUrl'),
}

model AddMonitorResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    taskId?: string(name='TaskId', example='300f7e67c82e42b48a197894f514d69b'),
  }(name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model AddMonitorResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddMonitorResponseBody(name='body'),
}

async function addMonitorWithOptions(request: AddMonitorRequest, runtime: Util.RuntimeOptions): AddMonitorResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmVendor)) {
    body['AlgorithmVendor'] = request.algorithmVendor;
  }
  if (!Util.isUnset(request.batchIndicator)) {
    body['BatchIndicator'] = request.batchIndicator;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.monitorType)) {
    body['MonitorType'] = request.monitorType;
  }
  if (!Util.isUnset(request.notifierAppSecret)) {
    body['NotifierAppSecret'] = request.notifierAppSecret;
  }
  if (!Util.isUnset(request.notifierExtendValues)) {
    body['NotifierExtendValues'] = request.notifierExtendValues;
  }
  if (!Util.isUnset(request.notifierTimeOut)) {
    body['NotifierTimeOut'] = request.notifierTimeOut;
  }
  if (!Util.isUnset(request.notifierType)) {
    body['NotifierType'] = request.notifierType;
  }
  if (!Util.isUnset(request.notifierUrl)) {
    body['NotifierUrl'] = request.notifierUrl;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddMonitor',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addMonitor(request: AddMonitorRequest): AddMonitorResponse {
  var runtime = new Util.RuntimeOptions{};
  return addMonitorWithOptions(request, runtime);
}

model AddProfileRequest {
  bizId?: string(name='BizId'),
  catalogId?: long(name='CatalogId', example='1'),
  corpId?: string(name='CorpId'),
  faceUrl?: string(name='FaceUrl'),
  gender?: int32(name='Gender', example='1'),
  idNumber?: string(name='IdNumber'),
  isvSubId?: string(name='IsvSubId'),
  liveAddress?: string(name='LiveAddress'),
  name?: string(name='Name'),
  phoneNo?: string(name='PhoneNo'),
  plateNo?: string(name='PlateNo'),
  sceneType?: string(name='SceneType'),
}

model AddProfileResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    bizId?: string(name='BizId'),
    catalogId?: int32(name='CatalogId', example='1'),
    faceUrl?: string(name='FaceUrl'),
    gender?: string(name='Gender', example='1'),
    idNumber?: string(name='IdNumber'),
    isvSubId?: string(name='IsvSubId'),
    liveAddress?: string(name='LiveAddress'),
    name?: string(name='Name'),
    phoneNo?: string(name='PhoneNo'),
    plateNo?: string(name='PlateNo'),
    profileId?: int32(name='ProfileId', example='1'),
    sceneType?: string(name='SceneType'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='XXXX-22222'),
}

model AddProfileResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddProfileResponseBody(name='body'),
}

async function addProfileWithOptions(request: AddProfileRequest, runtime: Util.RuntimeOptions): AddProfileResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.catalogId)) {
    body['CatalogId'] = request.catalogId;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.faceUrl)) {
    body['FaceUrl'] = request.faceUrl;
  }
  if (!Util.isUnset(request.gender)) {
    body['Gender'] = request.gender;
  }
  if (!Util.isUnset(request.idNumber)) {
    body['IdNumber'] = request.idNumber;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.liveAddress)) {
    body['LiveAddress'] = request.liveAddress;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.phoneNo)) {
    body['PhoneNo'] = request.phoneNo;
  }
  if (!Util.isUnset(request.plateNo)) {
    body['PlateNo'] = request.plateNo;
  }
  if (!Util.isUnset(request.sceneType)) {
    body['SceneType'] = request.sceneType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddProfile',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addProfile(request: AddProfileRequest): AddProfileResponse {
  var runtime = new Util.RuntimeOptions{};
  return addProfileWithOptions(request, runtime);
}

model AddProfileCatalogRequest {
  catalogName?: string(name='CatalogName'),
  corpId?: string(name='CorpId'),
  isvSubId?: string(name='IsvSubId'),
  parentCatalogId?: long(name='ParentCatalogId', example='0'),
}

model AddProfileCatalogResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    catalogId?: long(name='CatalogId', example='1'),
    catalogName?: string(name='CatalogName'),
    isvSubId?: string(name='IsvSubId'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='XXXX-XXX-XXXX'),
}

model AddProfileCatalogResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddProfileCatalogResponseBody(name='body'),
}

async function addProfileCatalogWithOptions(request: AddProfileCatalogRequest, runtime: Util.RuntimeOptions): AddProfileCatalogResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.catalogName)) {
    body['CatalogName'] = request.catalogName;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.parentCatalogId)) {
    body['ParentCatalogId'] = request.parentCatalogId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddProfileCatalog',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addProfileCatalog(request: AddProfileCatalogRequest): AddProfileCatalogResponse {
  var runtime = new Util.RuntimeOptions{};
  return addProfileCatalogWithOptions(request, runtime);
}

model AddSearchItemsRequest {
  searchItemList?: [ 
    {
      itemImageUrl?: string(name='ItemImageUrl'),
      searchItemId?: string(name='SearchItemId'),
      searchItemName?: string(name='SearchItemName'),
    }
  ](name='SearchItemList'),
  searchTableId?: string(name='SearchTableId'),
}

model AddSearchItemsShrinkRequest {
  searchItemListShrink?: string(name='SearchItemList'),
  searchTableId?: string(name='SearchTableId'),
}

model AddSearchItemsResponseBody = {
  code?: string(name='Code'),
  data?: {
    addedItemIds?: string(name='AddedItemIds'),
    failedItemIds?: string(name='FailedItemIds'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: string(name='Success'),
}

model AddSearchItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddSearchItemsResponseBody(name='body'),
}

async function addSearchItemsWithOptions(tmpReq: AddSearchItemsRequest, runtime: Util.RuntimeOptions): AddSearchItemsResponse {
  Util.validateModel(tmpReq);
  var request = new AddSearchItemsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.searchItemList)) {
    request.searchItemListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.searchItemList, 'SearchItemList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.searchItemListShrink)) {
    body['SearchItemList'] = request.searchItemListShrink;
  }
  if (!Util.isUnset(request.searchTableId)) {
    body['SearchTableId'] = request.searchTableId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddSearchItems',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addSearchItems(request: AddSearchItemsRequest): AddSearchItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return addSearchItemsWithOptions(request, runtime);
}

model AddWatchItemsRequest {
  watchItemList?: [ 
    {
      itemAttributes?: string(name='ItemAttributes', example='[	{  "Key":"HairColor", 	"Value":["4","1"], 	"Score":0.81	 }, 	{  "Key":"GenderCode",   "Value":["1"],   "Score":0.92 	}]'),
      itemImageUrl?: string(name='ItemImageUrl', example='http:/www.aliyun.com/file2'),
      watchItemId?: string(name='WatchItemId', example='30f6XXXX'),
      watchItemName?: string(name='WatchItemName', example='example'),
    }
  ](name='WatchItemList'),
  watchPolicyId?: string(name='WatchPolicyId', example='300f7e67c82e42b48a197894f512343b'),
}

model AddWatchItemsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    addedItemIds?: string(name='AddedItemIds', example='["30f6XXXX","7c2eXXXX","b4a1XXXX"]'),
    failedItemIds?: string(name='FailedItemIds', example='["30f6XXXX","7c2eXXXX","b4a1XXXX"]'),
  }(name='Data'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
}

model AddWatchItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: AddWatchItemsResponseBody(name='body'),
}

async function addWatchItemsWithOptions(request: AddWatchItemsRequest, runtime: Util.RuntimeOptions): AddWatchItemsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.watchItemList)) {
    bodyFlat['WatchItemList'] = request.watchItemList;
  }
  if (!Util.isUnset(request.watchPolicyId)) {
    body['WatchPolicyId'] = request.watchPolicyId;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddWatchItems',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function addWatchItems(request: AddWatchItemsRequest): AddWatchItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return addWatchItemsWithOptions(request, runtime);
}

model BatchDeleteInstanceRequest {
  instanceIds?: [ string ](name='InstanceIds', example='[ "1","2","3"]'),
  projectId?: string(name='ProjectId', example='23412342XXXX'),
}

model BatchDeleteInstanceShrinkRequest {
  instanceIdsShrink?: string(name='InstanceIds', example='[ "1","2","3"]'),
  projectId?: string(name='ProjectId', example='23412342XXXX'),
}

model BatchDeleteInstanceResponseBody = {
  code?: string(name='Code', example='0'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', description='RequestID', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
  success?: boolean(name='Success', example='true'),
}

model BatchDeleteInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BatchDeleteInstanceResponseBody(name='body'),
}

async function batchDeleteInstanceWithOptions(tmpReq: BatchDeleteInstanceRequest, runtime: Util.RuntimeOptions): BatchDeleteInstanceResponse {
  Util.validateModel(tmpReq);
  var request = new BatchDeleteInstanceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.instanceIds)) {
    request.instanceIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.instanceIds, 'InstanceIds', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.instanceIdsShrink)) {
    body['InstanceIds'] = request.instanceIdsShrink;
  }
  if (!Util.isUnset(request.projectId)) {
    body['ProjectId'] = request.projectId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BatchDeleteInstance',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function batchDeleteInstance(request: BatchDeleteInstanceRequest): BatchDeleteInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return batchDeleteInstanceWithOptions(request, runtime);
}

model BindCorpGroupRequest {
  corpGroupId?: string(name='CorpGroupId'),
  corpId?: string(name='CorpId'),
}

model BindCorpGroupResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model BindCorpGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BindCorpGroupResponseBody(name='body'),
}

async function bindCorpGroupWithOptions(request: BindCorpGroupRequest, runtime: Util.RuntimeOptions): BindCorpGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpGroupId)) {
    body['CorpGroupId'] = request.corpGroupId;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BindCorpGroup',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function bindCorpGroup(request: BindCorpGroupRequest): BindCorpGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return bindCorpGroupWithOptions(request, runtime);
}

model BindDevicesRequest {
  corpId?: string(name='CorpId', example='2741696169850700929'),
  deviceId?: string(name='DeviceId', example='VL_210235C5FG3215000144'),
  subDeviceList?: [ 
    {
      accessProtocol?: string(name='AccessProtocol', example='1'),
      loginName?: string(name='LoginName', example='admin'),
      PIN?: string(name='PIN', example='******'),
      subDeviceIp?: string(name='SubDeviceIp', example='192.168.0.123'),
      subDeviceName?: string(name='SubDeviceName'),
      subDevicePort?: string(name='SubDevicePort', example='1234'),
    }
  ](name='SubDeviceList'),
}

model BindDevicesShrinkRequest {
  corpId?: string(name='CorpId', example='2741696169850700929'),
  deviceId?: string(name='DeviceId', example='VL_210235C5FG3215000144'),
  subDeviceListShrink?: string(name='SubDeviceList'),
}

model BindDevicesResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    subDeviceList?: [ 
      {
        code?: string(name='Code', example='200'),
        message?: string(name='Message', example='SUCCESS'),
        subDeviceId?: string(name='SubDeviceId', example='VL_210235C5FG3215000144_1'),
        subDeviceIp?: string(name='SubDeviceIp', example='192.168.0.123'),
        subDeviceName?: string(name='SubDeviceName'),
        subDeviceNum?: string(name='SubDeviceNum', example='1'),
        subDevicePort?: string(name='SubDevicePort', example='1234'),
      }
    ](name='SubDeviceList'),
  }(name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model BindDevicesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BindDevicesResponseBody(name='body'),
}

async function bindDevicesWithOptions(tmpReq: BindDevicesRequest, runtime: Util.RuntimeOptions): BindDevicesResponse {
  Util.validateModel(tmpReq);
  var request = new BindDevicesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.subDeviceList)) {
    request.subDeviceListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.subDeviceList, 'SubDeviceList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.subDeviceListShrink)) {
    body['SubDeviceList'] = request.subDeviceListShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BindDevices',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function bindDevices(request: BindDevicesRequest): BindDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return bindDevicesWithOptions(request, runtime);
}

model BindPersonRequest {
  corpId?: string(name='CorpId'),
  isvSubId?: string(name='IsvSubId'),
  personId?: string(name='PersonId'),
  personMatchingRate?: string(name='PersonMatchingRate', example='0.8'),
  profileId?: long(name='ProfileId', example='1'),
}

model BindPersonResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='XXXX-XXX-XXXX'),
}

model BindPersonResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BindPersonResponseBody(name='body'),
}

async function bindPersonWithOptions(request: BindPersonRequest, runtime: Util.RuntimeOptions): BindPersonResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.personId)) {
    body['PersonId'] = request.personId;
  }
  if (!Util.isUnset(request.personMatchingRate)) {
    body['PersonMatchingRate'] = request.personMatchingRate;
  }
  if (!Util.isUnset(request.profileId)) {
    body['ProfileId'] = request.profileId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BindPerson',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function bindPerson(request: BindPersonRequest): BindPersonResponse {
  var runtime = new Util.RuntimeOptions{};
  return bindPersonWithOptions(request, runtime);
}

model BindUserRequest {
  corpId?: string(name='CorpId'),
  isvSubId?: string(name='IsvSubId'),
  matchingRate?: string(name='MatchingRate'),
  personId?: string(name='PersonId'),
  userId?: long(name='UserId'),
}

model BindUserResponseBody = {
  code?: string(name='Code'),
  data?: boolean(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model BindUserResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BindUserResponseBody(name='body'),
}

async function bindUserWithOptions(request: BindUserRequest, runtime: Util.RuntimeOptions): BindUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.matchingRate)) {
    body['MatchingRate'] = request.matchingRate;
  }
  if (!Util.isUnset(request.personId)) {
    body['PersonId'] = request.personId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BindUser',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function bindUser(request: BindUserRequest): BindUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return bindUserWithOptions(request, runtime);
}

model CheckAIInstanceNameRequest {
  instanceName?: string(name='InstanceName', example='example'),
  instanceType?: string(name='InstanceType', example='Offline'),
  projectId?: string(name='ProjectId', example='1'),
}

model CheckAIInstanceNameResponseBody = {
  code?: string(name='Code', example='0'),
  data?: {
    available?: boolean(name='Available'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
}

model CheckAIInstanceNameResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CheckAIInstanceNameResponseBody(name='body'),
}

async function checkAIInstanceNameWithOptions(request: CheckAIInstanceNameRequest, runtime: Util.RuntimeOptions): CheckAIInstanceNameResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.instanceName)) {
    body['InstanceName'] = request.instanceName;
  }
  if (!Util.isUnset(request.instanceType)) {
    body['InstanceType'] = request.instanceType;
  }
  if (!Util.isUnset(request.projectId)) {
    body['ProjectId'] = request.projectId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CheckAIInstanceName',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function checkAIInstanceName(request: CheckAIInstanceNameRequest): CheckAIInstanceNameResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkAIInstanceNameWithOptions(request, runtime);
}

model CheckSLRRequest {
  serviceName?: string(name='ServiceName'),
}

model CheckSLRResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model CheckSLRResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CheckSLRResponseBody(name='body'),
}

async function checkSLRWithOptions(request: CheckSLRRequest, runtime: Util.RuntimeOptions): CheckSLRResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.serviceName)) {
    query['ServiceName'] = request.serviceName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CheckSLR',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function checkSLR(request: CheckSLRRequest): CheckSLRResponse {
  var runtime = new Util.RuntimeOptions{};
  return checkSLRWithOptions(request, runtime);
}

model ControlAiotDeviceRequest {
  associatedDeviceId?: string(name='AssociatedDeviceId', example='52354326243632'),
  associatedIPAddr?: string(name='AssociatedIPAddr', example='10.1.2.22'),
  associatedPort?: long(name='AssociatedPort', example='3456'),
  associatedVerificationEnable?: string(name='AssociatedVerificationEnable', example='1'),
  barrierCommand?: long(name='BarrierCommand', example='1'),
  checkEnabled?: string(name='CheckEnabled', example='1'),
  commandType?: long(name='CommandType', example='10'),
  doubleVerificationGroupEnabled?: string(name='DoubleVerificationGroupEnabled', example='1'),
  gateCtlStatus?: long(name='GateCtlStatus', example='4'),
  id?: string(name='Id', example='356201295345457780132002021051835800128'),
  identityNumber?: string(name='IdentityNumber', example='350783198809196534'),
  isProxy?: boolean(name='IsProxy'),
  miFareCard?: {
    areaCode?: long(name='AreaCode', example='10'),
    areaDeviate?: long(name='AreaDeviate', example='2233'),
    areaLen?: long(name='AreaLen', example='23424'),
    enabled?: string(name='Enabled', example='1'),
    keyType?: long(name='KeyType', example='1'),
    lastChange?: string(name='LastChange', example='20220122103426'),
    secretKey?: string(name='SecretKey', example='sfaffasf'),
  }(name='MiFareCard'),
  name?: string(name='Name'),
  rebootDevice?: string(name='RebootDevice', example='1'),
  singleInterval?: long(name='SingleInterval', example='10'),
  superPassword?: string(name='SuperPassword', example='Ximing1234'),
  upgradeFileURL?: string(name='UpgradeFileURL', example='http://xxxx.upgrade.zip'),
}

model ControlAiotDeviceResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', description='Id of the request', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
}

model ControlAiotDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ControlAiotDeviceResponseBody(name='body'),
}

async function controlAiotDeviceWithOptions(request: ControlAiotDeviceRequest, runtime: Util.RuntimeOptions): ControlAiotDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.associatedDeviceId)) {
    body['AssociatedDeviceId'] = request.associatedDeviceId;
  }
  if (!Util.isUnset(request.associatedIPAddr)) {
    body['AssociatedIPAddr'] = request.associatedIPAddr;
  }
  if (!Util.isUnset(request.associatedPort)) {
    body['AssociatedPort'] = request.associatedPort;
  }
  if (!Util.isUnset(request.associatedVerificationEnable)) {
    body['AssociatedVerificationEnable'] = request.associatedVerificationEnable;
  }
  if (!Util.isUnset(request.barrierCommand)) {
    body['BarrierCommand'] = request.barrierCommand;
  }
  if (!Util.isUnset(request.checkEnabled)) {
    body['CheckEnabled'] = request.checkEnabled;
  }
  if (!Util.isUnset(request.commandType)) {
    body['CommandType'] = request.commandType;
  }
  if (!Util.isUnset(request.doubleVerificationGroupEnabled)) {
    body['DoubleVerificationGroupEnabled'] = request.doubleVerificationGroupEnabled;
  }
  if (!Util.isUnset(request.gateCtlStatus)) {
    body['GateCtlStatus'] = request.gateCtlStatus;
  }
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.identityNumber)) {
    body['IdentityNumber'] = request.identityNumber;
  }
  if (!Util.isUnset(request.isProxy)) {
    body['IsProxy'] = request.isProxy;
  }
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.miFareCard)) {
    bodyFlat['MiFareCard'] = request.miFareCard;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.rebootDevice)) {
    body['RebootDevice'] = request.rebootDevice;
  }
  if (!Util.isUnset(request.singleInterval)) {
    body['SingleInterval'] = request.singleInterval;
  }
  if (!Util.isUnset(request.superPassword)) {
    body['SuperPassword'] = request.superPassword;
  }
  if (!Util.isUnset(request.upgradeFileURL)) {
    body['UpgradeFileURL'] = request.upgradeFileURL;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ControlAiotDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function controlAiotDevice(request: ControlAiotDeviceRequest): ControlAiotDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return controlAiotDeviceWithOptions(request, runtime);
}

model CreateAIInstanceRequest {
  algorithmId?: string(name='AlgorithmId', example='1'),
  algorithmName?: string(name='AlgorithmName', example='人脸图片算法'),
  computeType?: string(name='ComputeType', example='StreamCompute'),
  containerType?: string(name='ContainerType', example='Offline'),
  dataSource?: string(name='DataSource', example='Camera'),
  dataSourceTimes?: [ 
    {
      endTime?: string(name='EndTime', example='11:00:00'),
      startTime?: string(name='StartTime', example='10:00:00'),
    }
  ](name='DataSourceTimes'),
  dataType?: string(name='DataType', example='Picture'),
  fps?: long(name='Fps', example='5'),
  instanceName?: string(name='InstanceName', example='example'),
  instanceType?: string(name='InstanceType', example='Offline'),
  projectId?: string(name='ProjectId', example='1'),
  scheduleCycleDates?: [ long ](name='ScheduleCycleDates'),
  scheduleTimes?: [ 
    {
      endTime?: string(name='EndTime', example='11:00:00'),
      startTime?: string(name='StartTime', example='10:00:00'),
    }
  ](name='ScheduleTimes'),
  scheduleType?: string(name='ScheduleType', example='EVERYDAY'),
  spf?: long(name='Spf', example='5'),
}

model CreateAIInstanceShrinkRequest {
  algorithmId?: string(name='AlgorithmId', example='1'),
  algorithmName?: string(name='AlgorithmName', example='人脸图片算法'),
  computeType?: string(name='ComputeType', example='StreamCompute'),
  containerType?: string(name='ContainerType', example='Offline'),
  dataSource?: string(name='DataSource', example='Camera'),
  dataSourceTimesShrink?: string(name='DataSourceTimes'),
  dataType?: string(name='DataType', example='Picture'),
  fps?: long(name='Fps', example='5'),
  instanceName?: string(name='InstanceName', example='example'),
  instanceType?: string(name='InstanceType', example='Offline'),
  projectId?: string(name='ProjectId', example='1'),
  scheduleCycleDatesShrink?: string(name='ScheduleCycleDates'),
  scheduleTimesShrink?: string(name='ScheduleTimes'),
  scheduleType?: string(name='ScheduleType', example='EVERYDAY'),
  spf?: long(name='Spf', example='5'),
}

model CreateAIInstanceResponseBody = {
  code?: string(name='Code', example='0'),
  data?: {
    acuUsed?: long(name='AcuUsed', example='1'),
    instanceId?: double(name='InstanceId', example='1'),
    storage?: string(name='Storage', example='0'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
}

model CreateAIInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateAIInstanceResponseBody(name='body'),
}

async function createAIInstanceWithOptions(tmpReq: CreateAIInstanceRequest, runtime: Util.RuntimeOptions): CreateAIInstanceResponse {
  Util.validateModel(tmpReq);
  var request = new CreateAIInstanceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.dataSourceTimes)) {
    request.dataSourceTimesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.dataSourceTimes, 'DataSourceTimes', 'json');
  }
  if (!Util.isUnset(tmpReq.scheduleCycleDates)) {
    request.scheduleCycleDatesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.scheduleCycleDates, 'ScheduleCycleDates', 'json');
  }
  if (!Util.isUnset(tmpReq.scheduleTimes)) {
    request.scheduleTimesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.scheduleTimes, 'ScheduleTimes', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmId)) {
    body['AlgorithmId'] = request.algorithmId;
  }
  if (!Util.isUnset(request.algorithmName)) {
    body['AlgorithmName'] = request.algorithmName;
  }
  if (!Util.isUnset(request.computeType)) {
    body['ComputeType'] = request.computeType;
  }
  if (!Util.isUnset(request.containerType)) {
    body['ContainerType'] = request.containerType;
  }
  if (!Util.isUnset(request.dataSource)) {
    body['DataSource'] = request.dataSource;
  }
  if (!Util.isUnset(request.dataSourceTimesShrink)) {
    body['DataSourceTimes'] = request.dataSourceTimesShrink;
  }
  if (!Util.isUnset(request.dataType)) {
    body['DataType'] = request.dataType;
  }
  if (!Util.isUnset(request.fps)) {
    body['Fps'] = request.fps;
  }
  if (!Util.isUnset(request.instanceName)) {
    body['InstanceName'] = request.instanceName;
  }
  if (!Util.isUnset(request.instanceType)) {
    body['InstanceType'] = request.instanceType;
  }
  if (!Util.isUnset(request.projectId)) {
    body['ProjectId'] = request.projectId;
  }
  if (!Util.isUnset(request.scheduleCycleDatesShrink)) {
    body['ScheduleCycleDates'] = request.scheduleCycleDatesShrink;
  }
  if (!Util.isUnset(request.scheduleTimesShrink)) {
    body['ScheduleTimes'] = request.scheduleTimesShrink;
  }
  if (!Util.isUnset(request.scheduleType)) {
    body['ScheduleType'] = request.scheduleType;
  }
  if (!Util.isUnset(request.spf)) {
    body['Spf'] = request.spf;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateAIInstance',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createAIInstance(request: CreateAIInstanceRequest): CreateAIInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAIInstanceWithOptions(request, runtime);
}

model CreateComputeInstanceRequest {
  acuUsed?: long(name='AcuUsed'),
  algorithmType?: string(name='AlgorithmType', example='PICTURE'),
  algorithms?: [ 
    {
      algorithmId?: string(name='AlgorithmId', example='1'),
      algorithmName?: string(name='AlgorithmName'),
    }
  ](name='Algorithms'),
  computePictureType?: string(name='ComputePictureType', example='spf'),
  computePictureValue?: string(name='ComputePictureValue', example='1'),
  datasourceType?: string(name='DatasourceType', example='REALTIME_STREAM'),
  devices?: [ 
    {
      bitRate?: string(name='BitRate', example='4Mbps'),
      codingFormat?: string(name='CodingFormat', example='H264'),
      deviceId?: string(name='DeviceId', example='1'),
      regionId?: string(name='RegionId', example='huadong'),
      resolvingPower?: string(name='ResolvingPower', example='1080p'),
      startStream?: boolean(name='StartStream', example='true'),
    }
  ](name='Devices'),
  instanceName?: string(name='InstanceName'),
  isFrameExtraction?: string(name='IsFrameExtraction', example='0'),
  isPolling?: boolean(name='IsPolling', example='true'),
  overallExecutionTime?: string(name='OverallExecutionTime', example='10'),
  picTopic?: string(name='PicTopic'),
  picType?: string(name='PicType'),
  pollingConfigs?: string(name='PollingConfigs'),
  projectId?: string(name='ProjectId', example='2'),
  scheduleCycleDate?: string(name='ScheduleCycleDate', example='1,4,6'),
  scheduleDay?: string(name='ScheduleDay', example='1'),
  scheduleDaySize?: string(name='ScheduleDaySize'),
  scheduleTimes?: string(name='ScheduleTimes', example='[{"StartTime":"10:00:00","EndTime":"11:00:00"}]'),
  scheduleType?: string(name='ScheduleType', example='EVERYDAY'),
  sliceExecutionTime?: string(name='SliceExecutionTime', example='60'),
  storageUsed?: string(name='StorageUsed'),
}

model CreateComputeInstanceShrinkRequest {
  acuUsed?: long(name='AcuUsed'),
  algorithmType?: string(name='AlgorithmType', example='PICTURE'),
  algorithmsShrink?: string(name='Algorithms'),
  computePictureType?: string(name='ComputePictureType', example='spf'),
  computePictureValue?: string(name='ComputePictureValue', example='1'),
  datasourceType?: string(name='DatasourceType', example='REALTIME_STREAM'),
  devicesShrink?: string(name='Devices'),
  instanceName?: string(name='InstanceName'),
  isFrameExtraction?: string(name='IsFrameExtraction', example='0'),
  isPolling?: boolean(name='IsPolling', example='true'),
  overallExecutionTime?: string(name='OverallExecutionTime', example='10'),
  picTopic?: string(name='PicTopic'),
  picType?: string(name='PicType'),
  pollingConfigs?: string(name='PollingConfigs'),
  projectId?: string(name='ProjectId', example='2'),
  scheduleCycleDate?: string(name='ScheduleCycleDate', example='1,4,6'),
  scheduleDay?: string(name='ScheduleDay', example='1'),
  scheduleDaySize?: string(name='ScheduleDaySize'),
  scheduleTimes?: string(name='ScheduleTimes', example='[{"StartTime":"10:00:00","EndTime":"11:00:00"}]'),
  scheduleType?: string(name='ScheduleType', example='EVERYDAY'),
  sliceExecutionTime?: string(name='SliceExecutionTime', example='60'),
  storageUsed?: string(name='StorageUsed'),
}

model CreateComputeInstanceResponseBody = {
  code?: string(name='Code', example='0'),
  data?: {
    acuUsed?: long(name='AcuUsed', example='1'),
    instanceId?: string(name='InstanceId', example='123'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', description='RequestID', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
  success?: boolean(name='Success', example='true'),
}

model CreateComputeInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateComputeInstanceResponseBody(name='body'),
}

async function createComputeInstanceWithOptions(tmpReq: CreateComputeInstanceRequest, runtime: Util.RuntimeOptions): CreateComputeInstanceResponse {
  Util.validateModel(tmpReq);
  var request = new CreateComputeInstanceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.algorithms)) {
    request.algorithmsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.algorithms, 'Algorithms', 'json');
  }
  if (!Util.isUnset(tmpReq.devices)) {
    request.devicesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.devices, 'Devices', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.acuUsed)) {
    body['AcuUsed'] = request.acuUsed;
  }
  if (!Util.isUnset(request.algorithmType)) {
    body['AlgorithmType'] = request.algorithmType;
  }
  if (!Util.isUnset(request.algorithmsShrink)) {
    body['Algorithms'] = request.algorithmsShrink;
  }
  if (!Util.isUnset(request.computePictureType)) {
    body['ComputePictureType'] = request.computePictureType;
  }
  if (!Util.isUnset(request.computePictureValue)) {
    body['ComputePictureValue'] = request.computePictureValue;
  }
  if (!Util.isUnset(request.datasourceType)) {
    body['DatasourceType'] = request.datasourceType;
  }
  if (!Util.isUnset(request.devicesShrink)) {
    body['Devices'] = request.devicesShrink;
  }
  if (!Util.isUnset(request.instanceName)) {
    body['InstanceName'] = request.instanceName;
  }
  if (!Util.isUnset(request.isFrameExtraction)) {
    body['IsFrameExtraction'] = request.isFrameExtraction;
  }
  if (!Util.isUnset(request.isPolling)) {
    body['IsPolling'] = request.isPolling;
  }
  if (!Util.isUnset(request.overallExecutionTime)) {
    body['OverallExecutionTime'] = request.overallExecutionTime;
  }
  if (!Util.isUnset(request.picTopic)) {
    body['PicTopic'] = request.picTopic;
  }
  if (!Util.isUnset(request.picType)) {
    body['PicType'] = request.picType;
  }
  if (!Util.isUnset(request.pollingConfigs)) {
    body['PollingConfigs'] = request.pollingConfigs;
  }
  if (!Util.isUnset(request.projectId)) {
    body['ProjectId'] = request.projectId;
  }
  if (!Util.isUnset(request.scheduleCycleDate)) {
    body['ScheduleCycleDate'] = request.scheduleCycleDate;
  }
  if (!Util.isUnset(request.scheduleDay)) {
    body['ScheduleDay'] = request.scheduleDay;
  }
  if (!Util.isUnset(request.scheduleDaySize)) {
    body['ScheduleDaySize'] = request.scheduleDaySize;
  }
  if (!Util.isUnset(request.scheduleTimes)) {
    body['ScheduleTimes'] = request.scheduleTimes;
  }
  if (!Util.isUnset(request.scheduleType)) {
    body['ScheduleType'] = request.scheduleType;
  }
  if (!Util.isUnset(request.sliceExecutionTime)) {
    body['SliceExecutionTime'] = request.sliceExecutionTime;
  }
  if (!Util.isUnset(request.storageUsed)) {
    body['StorageUsed'] = request.storageUsed;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateComputeInstance',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createComputeInstance(request: CreateComputeInstanceRequest): CreateComputeInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createComputeInstanceWithOptions(request, runtime);
}

model CreateCorpRequest {
  algorithmType?: string(name='AlgorithmType', example='damo'),
  appName?: string(name='AppName'),
  corpName?: string(name='CorpName'),
  description?: string(name='Description'),
  iconPath?: string(name='IconPath', example='https://xx.com/xx.jpg'),
  isvSubId?: string(name='IsvSubId', example='001'),
  parentCorpId?: string(name='ParentCorpId', example='10001'),
}

model CreateCorpResponseBody = {
  code?: string(name='Code', example='200'),
  corpId?: string(name='CorpId', example='100002'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='67464797_32b5_42d0_8601_134fc935****'),
}

model CreateCorpResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateCorpResponseBody(name='body'),
}

async function createCorpWithOptions(request: CreateCorpRequest, runtime: Util.RuntimeOptions): CreateCorpResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmType)) {
    body['AlgorithmType'] = request.algorithmType;
  }
  if (!Util.isUnset(request.appName)) {
    body['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.corpName)) {
    body['CorpName'] = request.corpName;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.iconPath)) {
    body['IconPath'] = request.iconPath;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.parentCorpId)) {
    body['ParentCorpId'] = request.parentCorpId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateCorp',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createCorp(request: CreateCorpRequest): CreateCorpResponse {
  var runtime = new Util.RuntimeOptions{};
  return createCorpWithOptions(request, runtime);
}

model CreateCorpGroupRequest {
  clientToken?: string(name='ClientToken'),
  corpId?: string(name='CorpId'),
  groupId?: string(name='GroupId'),
}

model CreateCorpGroupResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model CreateCorpGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateCorpGroupResponseBody(name='body'),
}

async function createCorpGroupWithOptions(request: CreateCorpGroupRequest, runtime: Util.RuntimeOptions): CreateCorpGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateCorpGroup',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createCorpGroup(request: CreateCorpGroupRequest): CreateCorpGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return createCorpGroupWithOptions(request, runtime);
}

model CreateDeviceRequest {
  activateCode?: string(name='ActivateCode', example='d390ce22-232f-431c-80ef-f0be633e****'),
  audioEnable?: string(name='AudioEnable', example='1'),
  cityCode?: string(name='CityCode', example='100010'),
  corpId?: string(name='CorpId', example='323153238989734****'),
  dataSourceType?: string(name='DataSourceType', example='PIC_VIDEO'),
  deviceAddress?: string(name='DeviceAddress'),
  deviceDirection?: string(name='DeviceDirection'),
  deviceId?: string(name='DeviceId', example='3200000099118700****'),
  deviceModel?: string(name='DeviceModel', example='ACube200-8'),
  deviceName?: string(name='DeviceName'),
  deviceRate?: string(name='DeviceRate', example='4096'),
  deviceResolution?: string(name='DeviceResolution', example='1920*1080'),
  deviceSite?: string(name='DeviceSite'),
  deviceSn?: string(name='DeviceSn', example='ca0e71642974****'),
  deviceType?: string(name='DeviceType', example='ABOX'),
  encodeFormat?: string(name='EncodeFormat', example='6'),
  frameRate?: string(name='FrameRate', example='25'),
  govLength?: string(name='GovLength', example='50'),
  inProtocol?: string(name='InProtocol', example='GBT28181'),
  latitude?: string(name='Latitude', example='39.916527'),
  longitude?: string(name='Longitude', example='116.397128'),
  OSDTimeEnable?: string(name='OSDTimeEnable', example='1'),
  OSDTimeType?: string(name='OSDTimeType', example='2'),
  OSDTimeX?: string(name='OSDTimeX', example='99'),
  OSDTimeY?: string(name='OSDTimeY', example='1'),
  parentDeviceId?: string(name='ParentDeviceId', example='3200000099118700****'),
  roi?: string(name='Roi'),
  subDeviceCount?: long(name='SubDeviceCount', example='3'),
  subDeviceIdList?: string(name='SubDeviceIdList', example='3200000099118700****,  3200000099118800****,  3200000099118100****'),
  vendor?: string(name='Vendor'),
}

model CreateDeviceResponseBody = {
  code?: string(name='Code', example='0'),
  data?: {
    deviceId?: string(name='DeviceId', example='33561635195013****'),
    password?: string(name='Password', example='******'),
    serverId?: string(name='ServerId', example='335616351220130****'),
    serverIp?: string(name='ServerIp', example='192.168.XX.XX'),
    serverPort?: string(name='ServerPort', example='8081'),
    serverRealm?: string(name='ServerRealm', example='2021*****'),
    subDeviceInfo?: [ 
      {
        subDeviceId?: string(name='SubDeviceId', example='335616351950130****'),
      }
    ](name='SubDeviceInfo'),
  }(name='Data'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model CreateDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateDeviceResponseBody(name='body'),
}

async function createDeviceWithOptions(request: CreateDeviceRequest, runtime: Util.RuntimeOptions): CreateDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.activateCode)) {
    body['ActivateCode'] = request.activateCode;
  }
  if (!Util.isUnset(request.audioEnable)) {
    body['AudioEnable'] = request.audioEnable;
  }
  if (!Util.isUnset(request.cityCode)) {
    body['CityCode'] = request.cityCode;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.dataSourceType)) {
    body['DataSourceType'] = request.dataSourceType;
  }
  if (!Util.isUnset(request.deviceAddress)) {
    body['DeviceAddress'] = request.deviceAddress;
  }
  if (!Util.isUnset(request.deviceDirection)) {
    body['DeviceDirection'] = request.deviceDirection;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.deviceModel)) {
    body['DeviceModel'] = request.deviceModel;
  }
  if (!Util.isUnset(request.deviceName)) {
    body['DeviceName'] = request.deviceName;
  }
  if (!Util.isUnset(request.deviceRate)) {
    body['DeviceRate'] = request.deviceRate;
  }
  if (!Util.isUnset(request.deviceResolution)) {
    body['DeviceResolution'] = request.deviceResolution;
  }
  if (!Util.isUnset(request.deviceSite)) {
    body['DeviceSite'] = request.deviceSite;
  }
  if (!Util.isUnset(request.deviceSn)) {
    body['DeviceSn'] = request.deviceSn;
  }
  if (!Util.isUnset(request.deviceType)) {
    body['DeviceType'] = request.deviceType;
  }
  if (!Util.isUnset(request.encodeFormat)) {
    body['EncodeFormat'] = request.encodeFormat;
  }
  if (!Util.isUnset(request.frameRate)) {
    body['FrameRate'] = request.frameRate;
  }
  if (!Util.isUnset(request.govLength)) {
    body['GovLength'] = request.govLength;
  }
  if (!Util.isUnset(request.inProtocol)) {
    body['InProtocol'] = request.inProtocol;
  }
  if (!Util.isUnset(request.latitude)) {
    body['Latitude'] = request.latitude;
  }
  if (!Util.isUnset(request.longitude)) {
    body['Longitude'] = request.longitude;
  }
  if (!Util.isUnset(request.OSDTimeEnable)) {
    body['OSDTimeEnable'] = request.OSDTimeEnable;
  }
  if (!Util.isUnset(request.OSDTimeType)) {
    body['OSDTimeType'] = request.OSDTimeType;
  }
  if (!Util.isUnset(request.OSDTimeX)) {
    body['OSDTimeX'] = request.OSDTimeX;
  }
  if (!Util.isUnset(request.OSDTimeY)) {
    body['OSDTimeY'] = request.OSDTimeY;
  }
  if (!Util.isUnset(request.parentDeviceId)) {
    body['ParentDeviceId'] = request.parentDeviceId;
  }
  if (!Util.isUnset(request.roi)) {
    body['Roi'] = request.roi;
  }
  if (!Util.isUnset(request.subDeviceCount)) {
    body['SubDeviceCount'] = request.subDeviceCount;
  }
  if (!Util.isUnset(request.subDeviceIdList)) {
    body['SubDeviceIdList'] = request.subDeviceIdList;
  }
  if (!Util.isUnset(request.vendor)) {
    body['Vendor'] = request.vendor;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createDevice(request: CreateDeviceRequest): CreateDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createDeviceWithOptions(request, runtime);
}

model CreateModelServiceRequest {
  algorithmCode?: string(name='AlgorithmCode', example='3860689472626623621001'),
  clientToken?: string(name='ClientToken', example='16445629062379448'),
  instanceName?: string(name='InstanceName', example='test'),
  QPSRequired?: int32(name='QPSRequired', example='1'),
}

model CreateModelServiceResponseBody = {
  code?: string(name='Code', example='0'),
  data?: {
    appCode?: string(name='AppCode', example='3f3e9316807842aa8e25a6d10fa77dd0'),
    modelApiList?: [ 
      {
        algorithmApiCode?: string(name='AlgorithmApiCode', example='3f3e9316807842aa8e25a6d10fa77dd0'),
        apiId?: string(name='ApiId', example='3f3e9316807842aa8e25a6d10fa77dd0'),
        apiName?: string(name='ApiName', example='test'),
        apiPath?: string(name='ApiPath', example='http://apigateway.aliyunvcs.cn/compute/raw/5d8b904b-dcb7-432d-b730-fcd7af083999/mock/api/9387534b-d6aa-404c-84fb-7c108343f410'),
        createTime?: string(name='CreateTime', example='2021-06-11T14:00:42+08:00'),
      }
    ](name='ModelApiList'),
    modelServiceInstanceId?: string(name='ModelServiceInstanceId', example='46329898'),
    modelServiceStatus?: string(name='ModelServiceStatus', example='Init'),
    qpsRequired?: int32(name='QpsRequired', example='1'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='132CDFE7-1FF5-5FC5-8C11-3D203CD7965C'),
}

model CreateModelServiceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateModelServiceResponseBody(name='body'),
}

async function createModelServiceWithOptions(request: CreateModelServiceRequest, runtime: Util.RuntimeOptions): CreateModelServiceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmCode)) {
    body['AlgorithmCode'] = request.algorithmCode;
  }
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.instanceName)) {
    body['InstanceName'] = request.instanceName;
  }
  if (!Util.isUnset(request.QPSRequired)) {
    body['QPSRequired'] = request.QPSRequired;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateModelService',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createModelService(request: CreateModelServiceRequest): CreateModelServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createModelServiceWithOptions(request, runtime);
}

model CreateNewDeviceRequest {
  cityCode?: string(name='CityCode'),
  corpId?: string(name='CorpId'),
  dataSourceType?: string(name='DataSourceType'),
  deviceAddress?: string(name='DeviceAddress'),
  deviceId?: string(name='DeviceId'),
  deviceModel?: string(name='DeviceModel'),
  deviceName?: string(name='DeviceName'),
  deviceType?: string(name='DeviceType'),
  filePath?: string(name='FilePath'),
  inProtocol?: string(name='InProtocol'),
  latitude?: string(name='Latitude'),
  longitude?: string(name='Longitude'),
  subDeviceCount?: long(name='SubDeviceCount'),
  vendor?: string(name='Vendor'),
}

model CreateNewDeviceResponseBody = {
  code?: string(name='Code'),
  data?: {
    deviceId?: string(name='DeviceId'),
    password?: string(name='Password'),
    serverId?: string(name='ServerId'),
    serverIp?: string(name='ServerIp'),
    serverPort?: string(name='ServerPort'),
    sipRealm?: string(name='SipRealm'),
    subDeviceInfo?: [ 
      {
        channelDeviceId?: string(name='ChannelDeviceId'),
      }
    ](name='SubDeviceInfo'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model CreateNewDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateNewDeviceResponseBody(name='body'),
}

/**
  * @deprecated
  *
  * @param request CreateNewDeviceRequest
  * @param runtime runtime options for this request RuntimeOptions
  * @return CreateNewDeviceResponse
 */
// Deprecated
async function createNewDeviceWithOptions(request: CreateNewDeviceRequest, runtime: Util.RuntimeOptions): CreateNewDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.cityCode)) {
    body['CityCode'] = request.cityCode;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.dataSourceType)) {
    body['DataSourceType'] = request.dataSourceType;
  }
  if (!Util.isUnset(request.deviceAddress)) {
    body['DeviceAddress'] = request.deviceAddress;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.deviceModel)) {
    body['DeviceModel'] = request.deviceModel;
  }
  if (!Util.isUnset(request.deviceName)) {
    body['DeviceName'] = request.deviceName;
  }
  if (!Util.isUnset(request.deviceType)) {
    body['DeviceType'] = request.deviceType;
  }
  if (!Util.isUnset(request.filePath)) {
    body['FilePath'] = request.filePath;
  }
  if (!Util.isUnset(request.inProtocol)) {
    body['InProtocol'] = request.inProtocol;
  }
  if (!Util.isUnset(request.latitude)) {
    body['Latitude'] = request.latitude;
  }
  if (!Util.isUnset(request.longitude)) {
    body['Longitude'] = request.longitude;
  }
  if (!Util.isUnset(request.subDeviceCount)) {
    body['SubDeviceCount'] = request.subDeviceCount;
  }
  if (!Util.isUnset(request.vendor)) {
    body['Vendor'] = request.vendor;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateNewDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
  * @deprecated
  *
  * @param request CreateNewDeviceRequest
  * @return CreateNewDeviceResponse
 */
// Deprecated
async function createNewDevice(request: CreateNewDeviceRequest): CreateNewDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createNewDeviceWithOptions(request, runtime);
}

model CreateScanDeviceRequest {
  audioEnable?: string(name='AudioEnable', example='false'),
  cityCode?: string(name='CityCode', example='100010'),
  corpId?: string(name='CorpId', example='3231532389897340550'),
  dataSourceType?: string(name='DataSourceType', example='PIC_VIDEO'),
  deviceAddress?: string(name='DeviceAddress'),
  deviceDirection?: string(name='DeviceDirection'),
  deviceId?: string(name='DeviceId'),
  deviceModel?: string(name='DeviceModel', example='ACube200-8'),
  deviceName?: string(name='DeviceName'),
  deviceRate?: string(name='DeviceRate', example='128-16384'),
  deviceResolution?: string(name='DeviceResolution', example='1080P'),
  deviceSite?: string(name='DeviceSite'),
  deviceSn?: string(name='DeviceSn', example='ca0e716429748525'),
  deviceType?: string(name='DeviceType', example='ABOX'),
  encodeFormat?: string(name='EncodeFormat', example='6'),
  frameRate?: string(name='FrameRate', example='25'),
  govLength?: string(name='GovLength', example='50'),
  inProtocol?: string(name='InProtocol'),
  latitude?: string(name='Latitude', example='116.397128'),
  longitude?: string(name='Longitude', example='39.916527'),
  OSDTimeEnable?: string(name='OSDTimeEnable', example='1'),
  OSDTimeType?: string(name='OSDTimeType', example='2'),
  OSDTimeX?: string(name='OSDTimeX', example='99'),
  OSDTimeY?: string(name='OSDTimeY', example='1'),
  subDeviceCount?: long(name='SubDeviceCount', example='6'),
  vendor?: string(name='Vendor'),
}

model CreateScanDeviceResponseBody = {
  code?: string(name='Code', example='0'),
  data?: {
    corpId?: string(name='CorpId', example='3231532389897340550'),
    deviceId?: string(name='DeviceId'),
    deviceSn?: string(name='DeviceSn', example='ca0e716429748525'),
    password?: string(name='Password'),
    serverId?: string(name='ServerId'),
    serverIp?: string(name='ServerIp'),
    serverPort?: string(name='ServerPort'),
    serverRealm?: string(name='ServerRealm'),
    sipDeviceGbId?: string(name='SipDeviceGbId', example='3356163519501303811'),
    subDeviceInfo?: [ 
      {
        channelDeviceId?: string(name='ChannelDeviceId'),
      }
    ](name='SubDeviceInfo'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='null'),
}

model CreateScanDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateScanDeviceResponseBody(name='body'),
}

/**
  * @deprecated
  *
  * @param request CreateScanDeviceRequest
  * @param runtime runtime options for this request RuntimeOptions
  * @return CreateScanDeviceResponse
 */
// Deprecated
async function createScanDeviceWithOptions(request: CreateScanDeviceRequest, runtime: Util.RuntimeOptions): CreateScanDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.audioEnable)) {
    body['AudioEnable'] = request.audioEnable;
  }
  if (!Util.isUnset(request.cityCode)) {
    body['CityCode'] = request.cityCode;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.dataSourceType)) {
    body['DataSourceType'] = request.dataSourceType;
  }
  if (!Util.isUnset(request.deviceAddress)) {
    body['DeviceAddress'] = request.deviceAddress;
  }
  if (!Util.isUnset(request.deviceDirection)) {
    body['DeviceDirection'] = request.deviceDirection;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.deviceModel)) {
    body['DeviceModel'] = request.deviceModel;
  }
  if (!Util.isUnset(request.deviceName)) {
    body['DeviceName'] = request.deviceName;
  }
  if (!Util.isUnset(request.deviceRate)) {
    body['DeviceRate'] = request.deviceRate;
  }
  if (!Util.isUnset(request.deviceResolution)) {
    body['DeviceResolution'] = request.deviceResolution;
  }
  if (!Util.isUnset(request.deviceSite)) {
    body['DeviceSite'] = request.deviceSite;
  }
  if (!Util.isUnset(request.deviceSn)) {
    body['DeviceSn'] = request.deviceSn;
  }
  if (!Util.isUnset(request.deviceType)) {
    body['DeviceType'] = request.deviceType;
  }
  if (!Util.isUnset(request.encodeFormat)) {
    body['EncodeFormat'] = request.encodeFormat;
  }
  if (!Util.isUnset(request.frameRate)) {
    body['FrameRate'] = request.frameRate;
  }
  if (!Util.isUnset(request.govLength)) {
    body['GovLength'] = request.govLength;
  }
  if (!Util.isUnset(request.inProtocol)) {
    body['InProtocol'] = request.inProtocol;
  }
  if (!Util.isUnset(request.latitude)) {
    body['Latitude'] = request.latitude;
  }
  if (!Util.isUnset(request.longitude)) {
    body['Longitude'] = request.longitude;
  }
  if (!Util.isUnset(request.OSDTimeEnable)) {
    body['OSDTimeEnable'] = request.OSDTimeEnable;
  }
  if (!Util.isUnset(request.OSDTimeType)) {
    body['OSDTimeType'] = request.OSDTimeType;
  }
  if (!Util.isUnset(request.OSDTimeX)) {
    body['OSDTimeX'] = request.OSDTimeX;
  }
  if (!Util.isUnset(request.OSDTimeY)) {
    body['OSDTimeY'] = request.OSDTimeY;
  }
  if (!Util.isUnset(request.subDeviceCount)) {
    body['SubDeviceCount'] = request.subDeviceCount;
  }
  if (!Util.isUnset(request.vendor)) {
    body['Vendor'] = request.vendor;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateScanDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
  * @deprecated
  *
  * @param request CreateScanDeviceRequest
  * @return CreateScanDeviceResponse
 */
// Deprecated
async function createScanDevice(request: CreateScanDeviceRequest): CreateScanDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return createScanDeviceWithOptions(request, runtime);
}

model CreateSearchTableRequest {
  algorithmId?: string(name='AlgorithmId'),
  searchTableName?: string(name='SearchTableName'),
  targetType?: string(name='TargetType'),
}

model CreateSearchTableResponseBody = {
  code?: string(name='Code'),
  data?: {
    searchTableId?: string(name='SearchTableId'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model CreateSearchTableResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateSearchTableResponseBody(name='body'),
}

async function createSearchTableWithOptions(request: CreateSearchTableRequest, runtime: Util.RuntimeOptions): CreateSearchTableResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmId)) {
    body['AlgorithmId'] = request.algorithmId;
  }
  if (!Util.isUnset(request.searchTableName)) {
    body['SearchTableName'] = request.searchTableName;
  }
  if (!Util.isUnset(request.targetType)) {
    body['TargetType'] = request.targetType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateSearchTable',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createSearchTable(request: CreateSearchTableRequest): CreateSearchTableResponse {
  var runtime = new Util.RuntimeOptions{};
  return createSearchTableWithOptions(request, runtime);
}

model CreateSubscribeRequest {
  deviceId?: string(name='DeviceId'),
  pushConfig?: string(name='PushConfig'),
}

model CreateSubscribeResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model CreateSubscribeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateSubscribeResponseBody(name='body'),
}

async function createSubscribeWithOptions(request: CreateSubscribeRequest, runtime: Util.RuntimeOptions): CreateSubscribeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.pushConfig)) {
    body['PushConfig'] = request.pushConfig;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateSubscribe',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createSubscribe(request: CreateSubscribeRequest): CreateSubscribeResponse {
  var runtime = new Util.RuntimeOptions{};
  return createSubscribeWithOptions(request, runtime);
}

model CreateUserRequest {
  address?: string(name='Address'),
  age?: int32(name='Age'),
  attachment?: string(name='Attachment'),
  bizId?: string(name='BizId'),
  corpId?: string(name='CorpId'),
  faceImageUrl?: string(name='FaceImageUrl'),
  gender?: int32(name='Gender'),
  idNumber?: string(name='IdNumber'),
  isvSubId?: string(name='IsvSubId'),
  phoneNo?: string(name='PhoneNo'),
  plateNo?: string(name='PlateNo'),
  userGroupId?: long(name='UserGroupId'),
  userName?: string(name='UserName'),
}

model CreateUserResponseBody = {
  code?: string(name='Code'),
  data?: {
    address?: string(name='Address'),
    age?: string(name='Age'),
    attachment?: string(name='Attachment'),
    bizId?: string(name='BizId'),
    faceImageUrl?: string(name='FaceImageUrl'),
    gender?: string(name='Gender'),
    idNumber?: string(name='IdNumber'),
    isvSubId?: string(name='IsvSubId'),
    phoneNo?: string(name='PhoneNo'),
    plateNo?: string(name='PlateNo'),
    userGroupId?: int32(name='UserGroupId'),
    userId?: int32(name='UserId'),
    userName?: string(name='UserName'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model CreateUserResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateUserResponseBody(name='body'),
}

async function createUserWithOptions(request: CreateUserRequest, runtime: Util.RuntimeOptions): CreateUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.address)) {
    body['Address'] = request.address;
  }
  if (!Util.isUnset(request.age)) {
    body['Age'] = request.age;
  }
  if (!Util.isUnset(request.attachment)) {
    body['Attachment'] = request.attachment;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.faceImageUrl)) {
    body['FaceImageUrl'] = request.faceImageUrl;
  }
  if (!Util.isUnset(request.gender)) {
    body['Gender'] = request.gender;
  }
  if (!Util.isUnset(request.idNumber)) {
    body['IdNumber'] = request.idNumber;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.phoneNo)) {
    body['PhoneNo'] = request.phoneNo;
  }
  if (!Util.isUnset(request.plateNo)) {
    body['PlateNo'] = request.plateNo;
  }
  if (!Util.isUnset(request.userGroupId)) {
    body['UserGroupId'] = request.userGroupId;
  }
  if (!Util.isUnset(request.userName)) {
    body['UserName'] = request.userName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateUser',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createUser(request: CreateUserRequest): CreateUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return createUserWithOptions(request, runtime);
}

model CreateUserGroupRequest {
  corpId?: string(name='CorpId', example='corpId'),
  isvSubId?: string(name='IsvSubId'),
  parentUserGroupId?: long(name='ParentUserGroupId', example='0'),
  userGroupName?: string(name='UserGroupName'),
}

model CreateUserGroupResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    isvSubId?: string(name='IsvSubId'),
    userGroupId?: long(name='UserGroupId', example='1'),
    userGroupName?: string(name='UserGroupName'),
  }(name='Data'),
  message?: string(name='Message', example='SYSTEM_ERROR'),
  requestId?: string(name='RequestId', example='ssss'),
}

model CreateUserGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateUserGroupResponseBody(name='body'),
}

async function createUserGroupWithOptions(request: CreateUserGroupRequest, runtime: Util.RuntimeOptions): CreateUserGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.parentUserGroupId)) {
    body['ParentUserGroupId'] = request.parentUserGroupId;
  }
  if (!Util.isUnset(request.userGroupName)) {
    body['UserGroupName'] = request.userGroupName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateUserGroup',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createUserGroup(request: CreateUserGroupRequest): CreateUserGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return createUserGroupWithOptions(request, runtime);
}

model CreateVideoComposeTaskRequest {
  audioFileName?: string(name='AudioFileName', example='test1/aaa.mp3'),
  bucketName?: string(name='BucketName', example='vcs-zhangtong'),
  corpId?: string(name='CorpId', example='vcs-zhangtong'),
  domainName?: string(name='DomainName', example='http://oss-cn-hangzhou.aliyuncs.com'),
  imageFileNames?: string(name='ImageFileNames', example='json.dumps(["test1/pic4.jpg",  "test1/pic5.jpg",   "test1/pic6.jpg"],)'),
  imageParameters?: string(name='ImageParameters', example='json.dumps([{"play_duration": 10, "in_duration": 4, "out_duration": 4, "in_way": "downhua", "out_way": "downhua"},                           {"play_duration": 10, "in_duration": 4, "out_duration": 4, "in_way": "jianxian", "out_way": "jianyin"},                           {"play_duration": 10, "in_duration": 4, "out_duration": 4, "in_way": "lefthua", "out_way": "righthua"},   ])'),
  videoFormat?: string(name='VideoFormat', example='mp4'),
  videoFrameRate?: int32(name='VideoFrameRate', example='5'),
}

model CreateVideoComposeTaskResponseBody = {
  bucketName?: string(name='BucketName', example='vcs-zhangtong'),
  code?: string(name='Code', example='success'),
  domainName?: string(name='DomainName', example='http://oss-cn-hangzhou.aliyuncs.com'),
  message?: string(name='Message', example='""'),
  requestId?: string(name='RequestId', example='4ea08acd9baccf37403d4fbe24591e7b'),
}

model CreateVideoComposeTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateVideoComposeTaskResponseBody(name='body'),
}

async function createVideoComposeTaskWithOptions(request: CreateVideoComposeTaskRequest, runtime: Util.RuntimeOptions): CreateVideoComposeTaskResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.audioFileName)) {
    body['AudioFileName'] = request.audioFileName;
  }
  if (!Util.isUnset(request.bucketName)) {
    body['BucketName'] = request.bucketName;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.domainName)) {
    body['DomainName'] = request.domainName;
  }
  if (!Util.isUnset(request.imageFileNames)) {
    body['ImageFileNames'] = request.imageFileNames;
  }
  if (!Util.isUnset(request.imageParameters)) {
    body['ImageParameters'] = request.imageParameters;
  }
  if (!Util.isUnset(request.videoFormat)) {
    body['VideoFormat'] = request.videoFormat;
  }
  if (!Util.isUnset(request.videoFrameRate)) {
    body['VideoFrameRate'] = request.videoFrameRate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateVideoComposeTask',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createVideoComposeTask(request: CreateVideoComposeTaskRequest): CreateVideoComposeTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createVideoComposeTaskWithOptions(request, runtime);
}

model CreateVideoSummaryTaskRequest {
  corpId?: string(name='CorpId', example='252060345870948812*'),
  deviceId?: string(name='DeviceId', example='1101050001132700****'),
  endTimeStamp?: long(name='EndTimeStamp', example='1581688288000'),
  liveVideoSummary?: string(name='LiveVideoSummary', example='true'),
  optionList?: string(name='OptionList'),
  startTimeStamp?: long(name='StartTimeStamp', example='1581688288000'),
}

model CreateVideoSummaryTaskResponseBody = {
  code?: string(name='Code', example='200'),
  data?: string(name='Data', example='100000'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='08ebc43f_a815_4ba2_8920_c113b60c66a4'),
}

model CreateVideoSummaryTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateVideoSummaryTaskResponseBody(name='body'),
}

async function createVideoSummaryTaskWithOptions(request: CreateVideoSummaryTaskRequest, runtime: Util.RuntimeOptions): CreateVideoSummaryTaskResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.endTimeStamp)) {
    body['EndTimeStamp'] = request.endTimeStamp;
  }
  if (!Util.isUnset(request.liveVideoSummary)) {
    body['LiveVideoSummary'] = request.liveVideoSummary;
  }
  if (!Util.isUnset(request.optionList)) {
    body['OptionList'] = request.optionList;
  }
  if (!Util.isUnset(request.startTimeStamp)) {
    body['StartTimeStamp'] = request.startTimeStamp;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateVideoSummaryTask',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createVideoSummaryTask(request: CreateVideoSummaryTaskRequest): CreateVideoSummaryTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createVideoSummaryTaskWithOptions(request, runtime);
}

model CreateWatchPolicyRequest {
  itemMatchType?: string(name='ItemMatchType', example='ByAttributes'),
  similarityThreshold?: double(name='SimilarityThreshold', example='0.92'),
  targetType?: string(name='TargetType', example='Event'),
  watchMode?: string(name='WatchMode', example='NotifyIfInList'),
  watchPolicyName?: string(name='WatchPolicyName', example='example'),
}

model CreateWatchPolicyResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    watchPolicyId?: string(name='WatchPolicyId', example='300f7e67c82e42b48a197894f512343b'),
  }(name='Data'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
}

model CreateWatchPolicyResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateWatchPolicyResponseBody(name='body'),
}

async function createWatchPolicyWithOptions(request: CreateWatchPolicyRequest, runtime: Util.RuntimeOptions): CreateWatchPolicyResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.itemMatchType)) {
    body['ItemMatchType'] = request.itemMatchType;
  }
  if (!Util.isUnset(request.similarityThreshold)) {
    body['SimilarityThreshold'] = request.similarityThreshold;
  }
  if (!Util.isUnset(request.targetType)) {
    body['TargetType'] = request.targetType;
  }
  if (!Util.isUnset(request.watchMode)) {
    body['WatchMode'] = request.watchMode;
  }
  if (!Util.isUnset(request.watchPolicyName)) {
    body['WatchPolicyName'] = request.watchPolicyName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateWatchPolicy',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createWatchPolicy(request: CreateWatchPolicyRequest): CreateWatchPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return createWatchPolicyWithOptions(request, runtime);
}

model CreateWatchTaskRequest {
  corpId?: string(name='CorpId', example='44B0E0XXXX'),
  description?: string(name='Description'),
  deviceList?: string(name='DeviceList', example='["1C44674CC97AXXXX", "915E4ACA5866XXXX"]'),
  messageReceiver?: string(name='MessageReceiver', example='{   "MessageQueue": "Kafka",   "Config": {     "BootstrapServers": "127.0.0.1:9092,127.0.0.2:9092",     "Topic": "topic_for_put_message",     "Authorization": "SASL",     "SASL": {       "Type": "PLAIN",       "Username": "username_for_put_message",       "Password": "password_for_put_message"     }   } }'),
  scheduleCycleDates?: string(name='ScheduleCycleDates', example='[1, 4, 6]'),
  scheduleTimes?: string(name='ScheduleTimes', example='[{"StartTime":"10:00:00","EndTime":"11:00:00"}]'),
  scheduleType?: string(name='ScheduleType', example='EVERYDAY'),
  taskName?: string(name='TaskName', example='example'),
  watchPolicyIds?: string(name='WatchPolicyIds', example='["30fXXXX","7c8XXXX","b48XXXX"]'),
}

model CreateWatchTaskResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    watchTaskId?: string(name='WatchTaskId', example='304E63XXXX'),
  }(name='Data'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
}

model CreateWatchTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateWatchTaskResponseBody(name='body'),
}

async function createWatchTaskWithOptions(request: CreateWatchTaskRequest, runtime: Util.RuntimeOptions): CreateWatchTaskResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.deviceList)) {
    body['DeviceList'] = request.deviceList;
  }
  if (!Util.isUnset(request.messageReceiver)) {
    body['MessageReceiver'] = request.messageReceiver;
  }
  if (!Util.isUnset(request.scheduleCycleDates)) {
    body['ScheduleCycleDates'] = request.scheduleCycleDates;
  }
  if (!Util.isUnset(request.scheduleTimes)) {
    body['ScheduleTimes'] = request.scheduleTimes;
  }
  if (!Util.isUnset(request.scheduleType)) {
    body['ScheduleType'] = request.scheduleType;
  }
  if (!Util.isUnset(request.taskName)) {
    body['TaskName'] = request.taskName;
  }
  if (!Util.isUnset(request.watchPolicyIds)) {
    body['WatchPolicyIds'] = request.watchPolicyIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateWatchTask',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createWatchTask(request: CreateWatchTaskRequest): CreateWatchTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return createWatchTaskWithOptions(request, runtime);
}

model DeleteAIInstanceRequest {
  instanceIds?: [ string ](name='InstanceIds'),
}

model DeleteAIInstanceShrinkRequest {
  instanceIdsShrink?: string(name='InstanceIds'),
}

model DeleteAIInstanceResponseBody = {
  code?: string(name='Code', example='0'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', description='RequestID', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
}

model DeleteAIInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteAIInstanceResponseBody(name='body'),
}

async function deleteAIInstanceWithOptions(tmpReq: DeleteAIInstanceRequest, runtime: Util.RuntimeOptions): DeleteAIInstanceResponse {
  Util.validateModel(tmpReq);
  var request = new DeleteAIInstanceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.instanceIds)) {
    request.instanceIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.instanceIds, 'InstanceIds', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.instanceIdsShrink)) {
    body['InstanceIds'] = request.instanceIdsShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAIInstance',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteAIInstance(request: DeleteAIInstanceRequest): DeleteAIInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAIInstanceWithOptions(request, runtime);
}

model DeleteAiotDeviceRequest {
  id?: string(name='Id'),
}

model DeleteAiotDeviceResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DeleteAiotDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteAiotDeviceResponseBody(name='body'),
}

async function deleteAiotDeviceWithOptions(request: DeleteAiotDeviceRequest, runtime: Util.RuntimeOptions): DeleteAiotDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAiotDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteAiotDevice(request: DeleteAiotDeviceRequest): DeleteAiotDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAiotDeviceWithOptions(request, runtime);
}

model DeleteAiotPersonTableRequest {
  id?: string(name='Id'),
  personTableId?: string(name='PersonTableId'),
}

model DeleteAiotPersonTableResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DeleteAiotPersonTableResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteAiotPersonTableResponseBody(name='body'),
}

async function deleteAiotPersonTableWithOptions(request: DeleteAiotPersonTableRequest, runtime: Util.RuntimeOptions): DeleteAiotPersonTableResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.personTableId)) {
    body['PersonTableId'] = request.personTableId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAiotPersonTable',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteAiotPersonTable(request: DeleteAiotPersonTableRequest): DeleteAiotPersonTableResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAiotPersonTableWithOptions(request, runtime);
}

model DeleteAiotPersonTableItemRequest {
  id?: string(name='Id'),
  personTableId?: string(name='PersonTableId'),
  personTableItemId?: string(name='PersonTableItemId'),
}

model DeleteAiotPersonTableItemResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DeleteAiotPersonTableItemResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteAiotPersonTableItemResponseBody(name='body'),
}

async function deleteAiotPersonTableItemWithOptions(request: DeleteAiotPersonTableItemRequest, runtime: Util.RuntimeOptions): DeleteAiotPersonTableItemResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.personTableId)) {
    body['PersonTableId'] = request.personTableId;
  }
  if (!Util.isUnset(request.personTableItemId)) {
    body['PersonTableItemId'] = request.personTableItemId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAiotPersonTableItem',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteAiotPersonTableItem(request: DeleteAiotPersonTableItemRequest): DeleteAiotPersonTableItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAiotPersonTableItemWithOptions(request, runtime);
}

model DeleteAiotVehicleTableItemRequest {
  id?: string(name='Id', example='356201295345457780132002021061834860053'),
  vehicleTableId?: string(name='VehicleTableId', example='1'),
  vehicleTableItemId?: string(name='VehicleTableItemId', example='1'),
}

model DeleteAiotVehicleTableItemResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
}

model DeleteAiotVehicleTableItemResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteAiotVehicleTableItemResponseBody(name='body'),
}

async function deleteAiotVehicleTableItemWithOptions(request: DeleteAiotVehicleTableItemRequest, runtime: Util.RuntimeOptions): DeleteAiotVehicleTableItemResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.vehicleTableId)) {
    body['VehicleTableId'] = request.vehicleTableId;
  }
  if (!Util.isUnset(request.vehicleTableItemId)) {
    body['VehicleTableItemId'] = request.vehicleTableItemId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAiotVehicleTableItem',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteAiotVehicleTableItem(request: DeleteAiotVehicleTableItemRequest): DeleteAiotVehicleTableItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAiotVehicleTableItemWithOptions(request, runtime);
}

model DeleteChannelRequest {
  deviceCodes?: string(name='DeviceCodes', example='33011012011327999****'),
}

model DeleteChannelResponseBody = {
  code?: string(name='Code', example='200'),
  data?: string(name='Data', example='OK'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='DDF228AE-956B-5357-B653-D4505B65DEB1'),
}

model DeleteChannelResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteChannelResponseBody(name='body'),
}

async function deleteChannelWithOptions(request: DeleteChannelRequest, runtime: Util.RuntimeOptions): DeleteChannelResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceCodes)) {
    body['DeviceCodes'] = request.deviceCodes;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteChannel',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteChannel(request: DeleteChannelRequest): DeleteChannelResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteChannelWithOptions(request, runtime);
}

model DeleteCorpGroupRequest {
  corpId?: string(name='CorpId'),
  groupId?: string(name='GroupId'),
}

model DeleteCorpGroupResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model DeleteCorpGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteCorpGroupResponseBody(name='body'),
}

async function deleteCorpGroupWithOptions(request: DeleteCorpGroupRequest, runtime: Util.RuntimeOptions): DeleteCorpGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCorpGroup',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteCorpGroup(request: DeleteCorpGroupRequest): DeleteCorpGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCorpGroupWithOptions(request, runtime);
}

model DeleteDataSourceRequest {
  corpId?: string(name='CorpId'),
  dataSourceId?: string(name='DataSourceId'),
}

model DeleteDataSourceResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  message?: string(name='Message'),
}

model DeleteDataSourceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDataSourceResponseBody(name='body'),
}

async function deleteDataSourceWithOptions(request: DeleteDataSourceRequest, runtime: Util.RuntimeOptions): DeleteDataSourceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.dataSourceId)) {
    body['DataSourceId'] = request.dataSourceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDataSource',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDataSource(request: DeleteDataSourceRequest): DeleteDataSourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDataSourceWithOptions(request, runtime);
}

model DeleteDataSourcesRequest {
  dataSourceIdList?: string(name='DataSourceIdList', example='ds_2b5754f9862f4e6d895646b121970957'),
}

model DeleteDataSourcesResponseBody = {
  code?: string(name='Code', example='200'),
  data?: [ 
    {
      code?: string(name='Code', example='200'),
      dataSourceId?: string(name='DataSourceId', example='ds_2b5754f9862f4e6d895646b121970957'),
      message?: string(name='Message', example='success'),
    }
  ](name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
}

model DeleteDataSourcesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDataSourcesResponseBody(name='body'),
}

async function deleteDataSourcesWithOptions(request: DeleteDataSourcesRequest, runtime: Util.RuntimeOptions): DeleteDataSourcesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.dataSourceIdList)) {
    body['DataSourceIdList'] = request.dataSourceIdList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDataSources',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDataSources(request: DeleteDataSourcesRequest): DeleteDataSourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDataSourcesWithOptions(request, runtime);
}

model DeleteDeviceRequest {
  corpId?: string(name='CorpId', example='10001'),
  gbId?: string(name='GbId', example='1101050001132700****'),
}

model DeleteDeviceResponseBody = {
  code?: string(name='Code', example='200'),
  data?: string(name='Data', example='true'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0001'),
}

model DeleteDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDeviceResponseBody(name='body'),
}

async function deleteDeviceWithOptions(request: DeleteDeviceRequest, runtime: Util.RuntimeOptions): DeleteDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.gbId)) {
    body['GbId'] = request.gbId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDevice(request: DeleteDeviceRequest): DeleteDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDeviceWithOptions(request, runtime);
}

model DeleteDeviceForInstanceRequest {
  algorithmId?: string(name='AlgorithmId', example='1'),
  deleteInstanceFlag?: boolean(name='DeleteInstanceFlag', example='false'),
  deviceCount?: string(name='DeviceCount', example='1'),
  devices?: [ 
    {
      deviceId?: string(name='DeviceId', example='1'),
      regionId?: string(name='RegionId', example='huadong-center'),
    }
  ](name='Devices'),
  instanceId?: string(name='InstanceId', example='1'),
  projectId?: string(name='ProjectId', example='1'),
}

model DeleteDeviceForInstanceShrinkRequest {
  algorithmId?: string(name='AlgorithmId', example='1'),
  deleteInstanceFlag?: boolean(name='DeleteInstanceFlag', example='false'),
  deviceCount?: string(name='DeviceCount', example='1'),
  devicesShrink?: string(name='Devices'),
  instanceId?: string(name='InstanceId', example='1'),
  projectId?: string(name='ProjectId', example='1'),
}

model DeleteDeviceForInstanceResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
}

model DeleteDeviceForInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDeviceForInstanceResponseBody(name='body'),
}

async function deleteDeviceForInstanceWithOptions(tmpReq: DeleteDeviceForInstanceRequest, runtime: Util.RuntimeOptions): DeleteDeviceForInstanceResponse {
  Util.validateModel(tmpReq);
  var request = new DeleteDeviceForInstanceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.devices)) {
    request.devicesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.devices, 'Devices', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmId)) {
    body['AlgorithmId'] = request.algorithmId;
  }
  if (!Util.isUnset(request.deleteInstanceFlag)) {
    body['DeleteInstanceFlag'] = request.deleteInstanceFlag;
  }
  if (!Util.isUnset(request.deviceCount)) {
    body['DeviceCount'] = request.deviceCount;
  }
  if (!Util.isUnset(request.devicesShrink)) {
    body['Devices'] = request.devicesShrink;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.projectId)) {
    body['ProjectId'] = request.projectId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDeviceForInstance',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDeviceForInstance(request: DeleteDeviceForInstanceRequest): DeleteDeviceForInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDeviceForInstanceWithOptions(request, runtime);
}

model DeleteDevicesRequest {
  deviceIdList?: string(name='DeviceIdList', example='128290****，918888****'),
}

model DeleteDevicesResponseBody = {
  code?: string(name='Code', example='200'),
  data?: [ 
    {
      code?: string(name='Code', example='200'),
      description?: string(name='Description', example='SUCCESS'),
      deviceId?: string(name='DeviceId', example='a128290019999188288****'),
    }
  ](name='Data'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model DeleteDevicesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDevicesResponseBody(name='body'),
}

async function deleteDevicesWithOptions(request: DeleteDevicesRequest, runtime: Util.RuntimeOptions): DeleteDevicesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceIdList)) {
    body['DeviceIdList'] = request.deviceIdList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDevices',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDevices(request: DeleteDevicesRequest): DeleteDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDevicesWithOptions(request, runtime);
}

model DeleteDoubleVerificationGroupRequest {
  doubleVerificationGroupId?: string(name='DoubleVerificationGroupId', example='1223'),
  id?: string(name='Id', example='356201295345457780132002021051835800018'),
}

model DeleteDoubleVerificationGroupResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', description='Id of the request', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model DeleteDoubleVerificationGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteDoubleVerificationGroupResponseBody(name='body'),
}

async function deleteDoubleVerificationGroupWithOptions(request: DeleteDoubleVerificationGroupRequest, runtime: Util.RuntimeOptions): DeleteDoubleVerificationGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.doubleVerificationGroupId)) {
    body['DoubleVerificationGroupId'] = request.doubleVerificationGroupId;
  }
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteDoubleVerificationGroup',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteDoubleVerificationGroup(request: DeleteDoubleVerificationGroupRequest): DeleteDoubleVerificationGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteDoubleVerificationGroupWithOptions(request, runtime);
}

model DeleteIPCDeviceRequest {
  deviceCodes?: string(name='DeviceCodes', example='33011012011327999****'),
}

model DeleteIPCDeviceResponseBody = {
  code?: string(name='Code', example='200'),
  data?: string(name='Data', example='1'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model DeleteIPCDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteIPCDeviceResponseBody(name='body'),
}

async function deleteIPCDeviceWithOptions(request: DeleteIPCDeviceRequest, runtime: Util.RuntimeOptions): DeleteIPCDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceCodes)) {
    body['DeviceCodes'] = request.deviceCodes;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteIPCDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteIPCDevice(request: DeleteIPCDeviceRequest): DeleteIPCDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteIPCDeviceWithOptions(request, runtime);
}

model DeleteModelServiceRequest {
  modelServiceId?: string(name='ModelServiceId', example='e0de4320-c394-47eb-9a77-a7c9c8307ba4'),
}

model DeleteModelServiceResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  data?: {
    modelServiceInstanceId?: string(name='ModelServiceInstanceId', example='796c5fe2-e812-423b-b16a-04d89bee3366'),
    modelServiceInstanceName?: int32(name='ModelServiceInstanceName', example='test'),
    modelServiceStatus?: string(name='ModelServiceStatus', example='stopped'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='A062703B-9957-5B54-BB72-5979B488DE02'),
}

model DeleteModelServiceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteModelServiceResponseBody(name='body'),
}

async function deleteModelServiceWithOptions(request: DeleteModelServiceRequest, runtime: Util.RuntimeOptions): DeleteModelServiceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.modelServiceId)) {
    body['ModelServiceId'] = request.modelServiceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteModelService',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteModelService(request: DeleteModelServiceRequest): DeleteModelServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteModelServiceWithOptions(request, runtime);
}

model DeleteNVRDeviceRequest {
  deviceCodes?: string(name='DeviceCodes', example='33011012011327999****'),
}

model DeleteNVRDeviceResponseBody = {
  code?: string(name='Code', example='200'),
  data?: string(name='Data', example='success'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
}

model DeleteNVRDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteNVRDeviceResponseBody(name='body'),
}

async function deleteNVRDeviceWithOptions(request: DeleteNVRDeviceRequest, runtime: Util.RuntimeOptions): DeleteNVRDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceCodes)) {
    body['DeviceCodes'] = request.deviceCodes;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteNVRDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteNVRDevice(request: DeleteNVRDeviceRequest): DeleteNVRDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteNVRDeviceWithOptions(request, runtime);
}

model DeleteProfileRequest {
  corpId?: string(name='CorpId'),
  isvSubId?: string(name='IsvSubId'),
  profileId?: long(name='ProfileId', example='1'),
}

model DeleteProfileResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='xxxxx-22222'),
}

model DeleteProfileResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteProfileResponseBody(name='body'),
}

async function deleteProfileWithOptions(request: DeleteProfileRequest, runtime: Util.RuntimeOptions): DeleteProfileResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.profileId)) {
    body['ProfileId'] = request.profileId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteProfile',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteProfile(request: DeleteProfileRequest): DeleteProfileResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteProfileWithOptions(request, runtime);
}

model DeleteProfileCatalogRequest {
  catalogId?: string(name='CatalogId', example='1'),
  corpId?: string(name='CorpId'),
  isvSubId?: string(name='IsvSubId'),
}

model DeleteProfileCatalogResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='XXXX-22222'),
}

model DeleteProfileCatalogResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteProfileCatalogResponseBody(name='body'),
}

async function deleteProfileCatalogWithOptions(request: DeleteProfileCatalogRequest, runtime: Util.RuntimeOptions): DeleteProfileCatalogResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.catalogId)) {
    body['CatalogId'] = request.catalogId;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteProfileCatalog',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteProfileCatalog(request: DeleteProfileCatalogRequest): DeleteProfileCatalogResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteProfileCatalogWithOptions(request, runtime);
}

model DeleteProjectRequest {
  projectIds?: string(name='ProjectIds', example='1,2,3'),
}

model DeleteProjectResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
}

model DeleteProjectResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteProjectResponseBody(name='body'),
}

async function deleteProjectWithOptions(request: DeleteProjectRequest, runtime: Util.RuntimeOptions): DeleteProjectResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.projectIds)) {
    query['ProjectIds'] = request.projectIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteProject',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteProject(request: DeleteProjectRequest): DeleteProjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteProjectWithOptions(request, runtime);
}

model DeleteRecordsRequest {
  algorithmType?: string(name='AlgorithmType'),
  attributeName?: string(name='AttributeName'),
  corpId?: string(name='CorpId'),
  operatorType?: string(name='OperatorType'),
  value?: string(name='Value'),
}

model DeleteRecordsResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DeleteRecordsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteRecordsResponseBody(name='body'),
}

async function deleteRecordsWithOptions(request: DeleteRecordsRequest, runtime: Util.RuntimeOptions): DeleteRecordsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmType)) {
    body['AlgorithmType'] = request.algorithmType;
  }
  if (!Util.isUnset(request.attributeName)) {
    body['AttributeName'] = request.attributeName;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.operatorType)) {
    body['OperatorType'] = request.operatorType;
  }
  if (!Util.isUnset(request.value)) {
    body['Value'] = request.value;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteRecords',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteRecords(request: DeleteRecordsRequest): DeleteRecordsResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteRecordsWithOptions(request, runtime);
}

model DeleteSearchTablesRequest {
  searchTableIds?: string(name='SearchTableIds'),
}

model DeleteSearchTablesResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: string(name='Success'),
}

model DeleteSearchTablesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteSearchTablesResponseBody(name='body'),
}

async function deleteSearchTablesWithOptions(request: DeleteSearchTablesRequest, runtime: Util.RuntimeOptions): DeleteSearchTablesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.searchTableIds)) {
    body['SearchTableIds'] = request.searchTableIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteSearchTables',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteSearchTables(request: DeleteSearchTablesRequest): DeleteSearchTablesResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteSearchTablesWithOptions(request, runtime);
}

model DeleteSubscribeRequest {
  deviceId?: string(name='DeviceId'),
}

model DeleteSubscribeResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DeleteSubscribeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteSubscribeResponseBody(name='body'),
}

async function deleteSubscribeWithOptions(request: DeleteSubscribeRequest, runtime: Util.RuntimeOptions): DeleteSubscribeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteSubscribe',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteSubscribe(request: DeleteSubscribeRequest): DeleteSubscribeResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteSubscribeWithOptions(request, runtime);
}

model DeleteUserRequest {
  corpId?: string(name='CorpId'),
  isvSubId?: string(name='IsvSubId'),
  userId?: long(name='UserId'),
}

model DeleteUserResponseBody = {
  code?: string(name='Code'),
  data?: boolean(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DeleteUserResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteUserResponseBody(name='body'),
}

async function deleteUserWithOptions(request: DeleteUserRequest, runtime: Util.RuntimeOptions): DeleteUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteUser',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteUser(request: DeleteUserRequest): DeleteUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUserWithOptions(request, runtime);
}

model DeleteUserGroupRequest {
  corpId?: string(name='CorpId'),
  isvSubId?: string(name='IsvSubId'),
  userGroupId?: string(name='UserGroupId'),
}

model DeleteUserGroupResponseBody = {
  code?: string(name='Code'),
  data?: boolean(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DeleteUserGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteUserGroupResponseBody(name='body'),
}

async function deleteUserGroupWithOptions(request: DeleteUserGroupRequest, runtime: Util.RuntimeOptions): DeleteUserGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.userGroupId)) {
    body['UserGroupId'] = request.userGroupId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteUserGroup',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteUserGroup(request: DeleteUserGroupRequest): DeleteUserGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUserGroupWithOptions(request, runtime);
}

model DeleteVideoSummaryTaskRequest {
  corpId?: string(name='CorpId'),
  taskId?: string(name='TaskId'),
}

model DeleteVideoSummaryTaskResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DeleteVideoSummaryTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteVideoSummaryTaskResponseBody(name='body'),
}

async function deleteVideoSummaryTaskWithOptions(request: DeleteVideoSummaryTaskRequest, runtime: Util.RuntimeOptions): DeleteVideoSummaryTaskResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.taskId)) {
    body['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteVideoSummaryTask',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteVideoSummaryTask(request: DeleteVideoSummaryTaskRequest): DeleteVideoSummaryTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteVideoSummaryTaskWithOptions(request, runtime);
}

model DeleteWatchPoliciesRequest {
  watchPolicyIds?: string(name='WatchPolicyIds', example='["30fXXXX","7c8XXXX","b48XXXX"]'),
}

model DeleteWatchPoliciesResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
}

model DeleteWatchPoliciesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteWatchPoliciesResponseBody(name='body'),
}

async function deleteWatchPoliciesWithOptions(request: DeleteWatchPoliciesRequest, runtime: Util.RuntimeOptions): DeleteWatchPoliciesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.watchPolicyIds)) {
    body['WatchPolicyIds'] = request.watchPolicyIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteWatchPolicies',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteWatchPolicies(request: DeleteWatchPoliciesRequest): DeleteWatchPoliciesResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteWatchPoliciesWithOptions(request, runtime);
}

model DeleteWatchTasksRequest {
  watchTaskIds?: string(name='WatchTaskIds', example='["C1DAXXXX", "C5D0XXXX"]'),
}

model DeleteWatchTasksResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
}

model DeleteWatchTasksResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteWatchTasksResponseBody(name='body'),
}

async function deleteWatchTasksWithOptions(request: DeleteWatchTasksRequest, runtime: Util.RuntimeOptions): DeleteWatchTasksResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.watchTaskIds)) {
    body['WatchTaskIds'] = request.watchTaskIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteWatchTasks',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteWatchTasks(request: DeleteWatchTasksRequest): DeleteWatchTasksResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteWatchTasksWithOptions(request, runtime);
}

model DescribeAIInstanceRequest {
  instanceId?: string(name='InstanceId', example='1'),
  instanceName?: string(name='InstanceName', example='example'),
  instanceType?: string(name='InstanceType', example='Offline'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  projectId?: string(name='ProjectId', example='1'),
}

model DescribeAIInstanceResponseBody = {
  code?: string(name='Code', example='0'),
  data?: {
    pageNumber?: long(name='PageNumber', example='1'),
    pageSize?: long(name='PageSize', example='10'),
    records?: [ 
      {
        acuUsed?: long(name='AcuUsed', example='1'),
        algorithmId?: string(name='AlgorithmId', example='1'),
        algorithmName?: string(name='AlgorithmName', example='example'),
        cameraNumber?: long(name='CameraNumber', example='10'),
        computeType?: string(name='ComputeType', example='StreamCompute'),
        containerType?: string(name='ContainerType'),
        createDateTime?: string(name='CreateDateTime', example='2021-08-26 10:55:58'),
        dataSource?: string(name='DataSource', example='Camera'),
        dataSourceTimes?: string(name='DataSourceTimes'),
        dataType?: string(name='DataType', example='Picture'),
        fps?: long(name='Fps', example='5'),
        instanceId?: string(name='InstanceId', example='1'),
        instanceName?: string(name='InstanceName', example='example'),
        instanceType?: string(name='InstanceType'),
        scheduleCycleDates?: string(name='ScheduleCycleDates', example='[1, 4, 6]'),
        scheduleTimes?: string(name='ScheduleTimes', example='[{"StartTime":"10:00:00","EndTime":"11:00:00"}]'),
        scheduleType?: string(name='ScheduleType', example='EVERYDAY'),
        spf?: long(name='Spf', example='5'),
        status?: string(name='Status', example='ONLINED'),
        storage?: double(name='Storage', example='1.66'),
      }
    ](name='Records'),
    totalCount?: long(name='TotalCount', example='100'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', description='RequestID', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
}

model DescribeAIInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeAIInstanceResponseBody(name='body'),
}

async function describeAIInstanceWithOptions(request: DescribeAIInstanceRequest, runtime: Util.RuntimeOptions): DescribeAIInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.instanceName)) {
    body['InstanceName'] = request.instanceName;
  }
  if (!Util.isUnset(request.instanceType)) {
    body['InstanceType'] = request.instanceType;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.projectId)) {
    body['ProjectId'] = request.projectId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAIInstance',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeAIInstance(request: DescribeAIInstanceRequest): DescribeAIInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAIInstanceWithOptions(request, runtime);
}

model DescribeAiotDevicesRequest {
  corpIdList?: string(name='CorpIdList'),
  idList?: string(name='IdList'),
  pageNum?: long(name='PageNum'),
  pageSize?: long(name='PageSize'),
}

model DescribeAiotDevicesResponseBody = {
  aiotDevices?: {
    aiotDeviceList?: [ 
      {
        capDirection?: string(name='CapDirection'),
        corpId?: string(name='CorpId'),
        deviceId?: string(name='DeviceId'),
        deviceType?: string(name='DeviceType'),
        firmwareVersion?: string(name='FirmwareVersion'),
        IPAddr?: string(name='IPAddr'),
        IPV6Addr?: string(name='IPV6Addr'),
        IPv4Gateway?: string(name='IPv4Gateway'),
        IPv4Netmask?: string(name='IPv4Netmask'),
        id?: string(name='Id'),
        isOnline?: string(name='IsOnline'),
        latitude?: float(name='Latitude'),
        longitude?: float(name='Longitude'),
        MAC?: string(name='MAC'),
        manufacturer?: string(name='Manufacturer'),
        model?: string(name='Model'),
        monitorAreaDesc?: string(name='MonitorAreaDesc'),
        monitorDirection?: string(name='MonitorDirection'),
        name?: string(name='Name'),
        orgCode?: string(name='OrgCode'),
        ownerApsID?: string(name='OwnerApsID'),
        password?: string(name='Password'),
        place?: string(name='Place'),
        placeCode?: string(name='PlaceCode'),
        port?: long(name='Port'),
        serialNuber?: string(name='SerialNuber'),
        userId?: string(name='UserId'),
      }
    ](name='AiotDeviceList'),
    pageNum?: long(name='PageNum'),
    pageSize?: long(name='PageSize'),
    totalNum?: long(name='TotalNum'),
  }(name='AiotDevices'),
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DescribeAiotDevicesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeAiotDevicesResponseBody(name='body'),
}

async function describeAiotDevicesWithOptions(request: DescribeAiotDevicesRequest, runtime: Util.RuntimeOptions): DescribeAiotDevicesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpIdList)) {
    body['CorpIdList'] = request.corpIdList;
  }
  if (!Util.isUnset(request.idList)) {
    body['IdList'] = request.idList;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAiotDevices',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeAiotDevices(request: DescribeAiotDevicesRequest): DescribeAiotDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAiotDevicesWithOptions(request, runtime);
}

model DescribeAiotPersonTableItemsRequest {
  id?: string(name='Id', example='356201295345457780132002021051835800726'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  personTableId?: string(name='PersonTableId', example='33010800001329000000062021061016383600004'),
  personTableItemId?: string(name='PersonTableItemId', example='742997802162183747870516218374787051621837478705'),
}

model DescribeAiotPersonTableItemsResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  personTableItems?: {
    pageNum?: long(name='PageNum', example='1'),
    pageSize?: long(name='PageSize', example='10'),
    personTableItemList?: [ 
      {
        identificationList?: [ 
          {
            number?: string(name='Number', example='123444'),
            type?: long(name='Type', example='2'),
          }
        ](name='IdentificationList'),
        identificationNum?: long(name='IdentificationNum', example='1'),
        imageList?: [ 
          {
            data?: string(name='Data', example='ZHNnc2Fnc2Fnc2FnYWdzYWc='),
            deviceId?: string(name='DeviceId', example='2351352151251251'),
            eventSort?: string(name='EventSort', example='1'),
            featureInfo?: {
              algorithmType?: string(name='AlgorithmType', example='1'),
              algorithmVersion?: string(name='AlgorithmVersion', example='ISFRFR259.2.0'),
              featureData?: string(name='FeatureData', example='ZHNnc2Fnc2Fnc2FnYWdzYWdzYWJzYWdocmVxaGVoNDVlMzQ0NjMyaGV3'),
              imageId?: string(name='ImageId', example='742997802162183747870516218374787051561837478705'),
              objectId?: string(name='ObjectId', example='742997802162183747870516218374787051621837478703'),
              tableId?: string(name='TableId', example='33010800001329000000062021061016383600004'),
              vendor?: string(name='Vendor', example='bresee'),
            }(name='FeatureInfo'),
            fileFormat?: string(name='FileFormat', example='jpg'),
            height?: long(name='Height', example='1920'),
            imageId?: string(name='ImageId', example='33010800001329000000062021061016383600001'),
            shotTime?: string(name='ShotTime', example='20220123045657'),
            size?: long(name='Size', example='300'),
            storagePath?: string(name='StoragePath', example='http://xxxxx.jpg'),
            type?: string(name='Type', example='1'),
            width?: long(name='Width', example='1080'),
          }
        ](name='ImageList'),
        imageNum?: long(name='ImageNum', example='1'),
        lastChange?: string(name='LastChange', example='20220122093418'),
        personCode?: string(name='PersonCode', example='123'),
        personId?: string(name='PersonId', example='742997802162183747870516218374787051621837478705'),
        personName?: string(name='PersonName'),
        personTableId?: string(name='PersonTableId', example='33010800001329000000062021061016383600004'),
        remarks?: string(name='Remarks', example='test'),
      }
    ](name='PersonTableItemList'),
    totalNum?: long(name='TotalNum', example='1'),
  }(name='PersonTableItems'),
  requestId?: string(name='RequestId', description='Id of the request', example='FDC9A716-654C-580A-B62A-99475C4CEF9D'),
}

model DescribeAiotPersonTableItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeAiotPersonTableItemsResponseBody(name='body'),
}

async function describeAiotPersonTableItemsWithOptions(request: DescribeAiotPersonTableItemsRequest, runtime: Util.RuntimeOptions): DescribeAiotPersonTableItemsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.personTableId)) {
    body['PersonTableId'] = request.personTableId;
  }
  if (!Util.isUnset(request.personTableItemId)) {
    body['PersonTableItemId'] = request.personTableItemId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAiotPersonTableItems',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeAiotPersonTableItems(request: DescribeAiotPersonTableItemsRequest): DescribeAiotPersonTableItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAiotPersonTableItemsWithOptions(request, runtime);
}

model DescribeAiotPersonTablesRequest {
  id?: string(name='Id', example='356201295345457780132002021052925190093'),
  personTableIdList?: string(name='PersonTableIdList', example='1,2,3'),
}

model DescribeAiotPersonTablesResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  personTableList?: [ 
    {
      deviceId?: string(name='DeviceId', example='35252525252'),
      faceNum?: long(name='FaceNum', example='1'),
      lastChange?: string(name='LastChange', example='20220122102211'),
      name?: string(name='Name'),
      personNum?: long(name='PersonNum', example='1'),
      personTableId?: string(name='PersonTableId', example='53345325235235'),
      totalPersonNum?: long(name='TotalPersonNum', example='100'),
      type?: long(name='Type', example='1'),
      verificationModelList?: [ long ](name='VerificationModelList'),
    }
  ](name='PersonTableList'),
  requestId?: string(name='RequestId', description='Id of the request', example='C46D1C95-E552-5764-AE03-BDA6544440F8'),
}

model DescribeAiotPersonTablesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeAiotPersonTablesResponseBody(name='body'),
}

async function describeAiotPersonTablesWithOptions(request: DescribeAiotPersonTablesRequest, runtime: Util.RuntimeOptions): DescribeAiotPersonTablesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.personTableIdList)) {
    body['PersonTableIdList'] = request.personTableIdList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAiotPersonTables',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeAiotPersonTables(request: DescribeAiotPersonTablesRequest): DescribeAiotPersonTablesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAiotPersonTablesWithOptions(request, runtime);
}

model DescribeAiotVehicleTableItemsRequest {
  id?: string(name='Id'),
  pageNum?: long(name='PageNum'),
  pageSize?: long(name='PageSize'),
  vehicleTableId?: string(name='VehicleTableId'),
  vehicleTableItemId?: string(name='VehicleTableItemId'),
}

model DescribeAiotVehicleTableItemsResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  vehicleTableItems?: {
    pageNum?: long(name='PageNum'),
    pageSize?: long(name='PageSize'),
    totalNum?: long(name='TotalNum'),
    vehicleTableItemList?: [ 
      {
        beginTime?: string(name='BeginTime'),
        endTime?: string(name='EndTime'),
        ownerName?: string(name='OwnerName'),
        phoneNo?: string(name='PhoneNo'),
        plateNo?: string(name='PlateNo'),
        remarks?: string(name='Remarks'),
        vehicleTableId?: string(name='VehicleTableId'),
        vehicleTableItemId?: string(name='VehicleTableItemId'),
      }
    ](name='VehicleTableItemList'),
  }(name='VehicleTableItems'),
}

model DescribeAiotVehicleTableItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeAiotVehicleTableItemsResponseBody(name='body'),
}

async function describeAiotVehicleTableItemsWithOptions(request: DescribeAiotVehicleTableItemsRequest, runtime: Util.RuntimeOptions): DescribeAiotVehicleTableItemsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.vehicleTableId)) {
    body['VehicleTableId'] = request.vehicleTableId;
  }
  if (!Util.isUnset(request.vehicleTableItemId)) {
    body['VehicleTableItemId'] = request.vehicleTableItemId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAiotVehicleTableItems',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeAiotVehicleTableItems(request: DescribeAiotVehicleTableItemsRequest): DescribeAiotVehicleTableItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAiotVehicleTableItemsWithOptions(request, runtime);
}

model DescribeAiotVehicleTablesRequest {
  id?: string(name='Id', example='356201295345457780132002021051835800018'),
  vehicleTableIdList?: string(name='VehicleTableIdList', example='1'),
}

model DescribeAiotVehicleTablesResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  vehicleTableList?: [ 
    {
      vehicleTableId?: string(name='VehicleTableId', example='1'),
      vehicleTableName?: string(name='VehicleTableName'),
    }
  ](name='VehicleTableList'),
}

model DescribeAiotVehicleTablesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeAiotVehicleTablesResponseBody(name='body'),
}

async function describeAiotVehicleTablesWithOptions(request: DescribeAiotVehicleTablesRequest, runtime: Util.RuntimeOptions): DescribeAiotVehicleTablesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.vehicleTableIdList)) {
    body['VehicleTableIdList'] = request.vehicleTableIdList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeAiotVehicleTables',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeAiotVehicleTables(request: DescribeAiotVehicleTablesRequest): DescribeAiotVehicleTablesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAiotVehicleTablesWithOptions(request, runtime);
}

model DescribeCameraForInstanceRequest {
  instanceId?: string(name='InstanceId', example='1'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
}

model DescribeCameraForInstanceResponseBody = {
  code?: string(name='Code', example='0'),
  data?: {
    pageNumber?: long(name='PageNumber', example='1'),
    pageSize?: long(name='PageSize', example='10'),
    records?: [ 
      {
        cameraAddress?: string(name='CameraAddress', example='xx省xx市xx'),
        cameraId?: string(name='CameraId', example='33011012011327999****'),
        cameraName?: string(name='CameraName', example='example'),
        cameraStatus?: long(name='CameraStatus', example='1'),
      }
    ](name='Records'),
    totalCount?: long(name='TotalCount', example='100'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model DescribeCameraForInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeCameraForInstanceResponseBody(name='body'),
}

async function describeCameraForInstanceWithOptions(request: DescribeCameraForInstanceRequest, runtime: Util.RuntimeOptions): DescribeCameraForInstanceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeCameraForInstance',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeCameraForInstance(request: DescribeCameraForInstanceRequest): DescribeCameraForInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeCameraForInstanceWithOptions(request, runtime);
}

model DescribeChannelsRequest {
  deviceFilter?: string(name='DeviceFilter', example='11011600991327000045'),
  deviceStatus?: string(name='DeviceStatus', example='1'),
  nvrId?: string(name='NvrId', description='NVR ID', example='42120000991187000001'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  showUnConfig?: long(name='ShowUnConfig', example='1'),
}

model DescribeChannelsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNum?: long(name='PageNum', example='1'),
    pageSize?: long(name='PageSize', example='10'),
    records?: [ 
      {
        audioEnable?: string(name='AudioEnable', example='1'),
        corpId?: string(name='CorpId', example='3231532389897340550'),
        createTime?: string(name='CreateTime', example='2021-07-12 14:08:22'),
        datasourceType?: string(name='DatasourceType', example='PIC_VIDEO'),
        deviceAddress?: string(name='DeviceAddress'),
        deviceDirection?: string(name='DeviceDirection'),
        deviceId?: string(name='DeviceId', example='0757740611131545****'),
        deviceIp?: string(name='DeviceIp', example='192.168.0.123'),
        deviceModel?: string(name='DeviceModel', example='ACube200-8'),
        deviceName?: string(name='DeviceName'),
        deviceRate?: string(name='DeviceRate', example='128-16384'),
        deviceResolution?: string(name='DeviceResolution', example='1080P'),
        deviceSite?: string(name='DeviceSite'),
        deviceSn?: string(name='DeviceSn', example='ca0e716429748525'),
        deviceStatus?: string(name='DeviceStatus', example='1'),
        deviceSubType?: string(name='DeviceSubType'),
        deviceType?: string(name='DeviceType', example='ABOX'),
        encodeFormat?: string(name='EncodeFormat', example='6'),
        frameRate?: string(name='FrameRate', example='25'),
        govLength?: string(name='GovLength', example='50'),
        inProtocol?: string(name='InProtocol', example='GBT28181'),
        latitude?: string(name='Latitude', example='116.397128'),
        longitude?: string(name='Longitude', example='39.916527'),
        modifyTime?: string(name='ModifyTime', example='2021-07-12 14:08:22'),
        OSDTimeEnable?: string(name='OSDTimeEnable', example='1'),
        OSDTimeType?: string(name='OSDTimeType', example='1'),
        OSDTimeX?: string(name='OSDTimeX', example='99'),
        OSDTimeY?: string(name='OSDTimeY', example='1'),
        parentDeviceId?: string(name='ParentDeviceId', example='0757740611131545****'),
        password?: string(name='Password', example='******'),
        serverId?: string(name='ServerId', example='335616351220130****'),
        serverIp?: string(name='ServerIp', example='192.168.XX.XX'),
        serverPort?: string(name='ServerPort', example='8081'),
        serverRealm?: string(name='ServerRealm', example='2021*****'),
        streamAction?: string(name='StreamAction', example='1'),
        streamStatus?: string(name='StreamStatus', example='1'),
        vap?: string(name='Vap', example='vc'),
        vendor?: string(name='Vendor'),
      }
    ](name='Records'),
    totalCount?: long(name='TotalCount', example='32'),
    totalPage?: long(name='TotalPage', example='4'),
    unConfigList?: [ string ](name='UnConfigList'),
  }(name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='CDDC6C3E-F49C-5707-8D2A-BE3934FE073F'),
}

model DescribeChannelsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeChannelsResponseBody(name='body'),
}

async function describeChannelsWithOptions(request: DescribeChannelsRequest, runtime: Util.RuntimeOptions): DescribeChannelsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceFilter)) {
    body['DeviceFilter'] = request.deviceFilter;
  }
  if (!Util.isUnset(request.deviceStatus)) {
    body['DeviceStatus'] = request.deviceStatus;
  }
  if (!Util.isUnset(request.nvrId)) {
    body['NvrId'] = request.nvrId;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.showUnConfig)) {
    body['ShowUnConfig'] = request.showUnConfig;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeChannels',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeChannels(request: DescribeChannelsRequest): DescribeChannelsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeChannelsWithOptions(request, runtime);
}

model DescribeDataSourcesRequest {
  corpIdList?: string(name='CorpIdList', example='2749639079967589249'),
  dataSourceCategory?: string(name='DataSourceCategory', example='DATASOURCE'),
  dataSourceFilter?: string(name='DataSourceFilter', example='ds_118e260d7f21454892e4c17caa3d668d'),
  dataSourceIdList?: string(name='DataSourceIdList', example='ds_4dc6c5c2b19045f68768e480c0b1a6c3'),
  dataSourceType?: string(name='DataSourceType', example='VIDEO'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  streamStatus?: string(name='StreamStatus', example='1'),
}

model DescribeDataSourcesResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNum?: long(name='PageNum', example='1'),
    pageSize?: long(name='PageSize', example='10'),
    records?: [ 
      {
        action?: string(name='Action', example='1'),
        corpId?: string(name='CorpId', example='3234945782171828231'),
        createTime?: string(name='CreateTime', example='2021-05-14 15:01:05'),
        dataSourceId?: string(name='DataSourceId', example='ds_0b0afa58864342bbbdaf882dc00e223b'),
        dataSourceName?: string(name='DataSourceName'),
        dataSourceType?: string(name='DataSourceType', example='VIDEO'),
        description?: string(name='Description', example='xxx'),
        kafkaTopic?: string(name='KafkaTopic', description='kafka topic', example='pic_algoxxx'),
        ossPath?: string(name='OssPath', example='pic_algoxxx'),
        streamStatus?: string(name='StreamStatus', example='1'),
        url?: string(name='Url', example='http://192.168.52.93:8080/live/33010000991327000018-0-0.flv?pipe_id=p-417b67c57e1a4b7a99d1266656cff206&auth_key=016ewZc3ARKJwIhlveTr63aS2NeSBqi9'),
      }
    ](name='Records'),
    totalCount?: long(name='TotalCount', example='100'),
    totalPage?: long(name='TotalPage', example='1'),
  }(name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='6E89C6CB-7B4C-53B3-BD25-3ED444A928C2'),
}

model DescribeDataSourcesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeDataSourcesResponseBody(name='body'),
}

async function describeDataSourcesWithOptions(request: DescribeDataSourcesRequest, runtime: Util.RuntimeOptions): DescribeDataSourcesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpIdList)) {
    body['CorpIdList'] = request.corpIdList;
  }
  if (!Util.isUnset(request.dataSourceCategory)) {
    body['DataSourceCategory'] = request.dataSourceCategory;
  }
  if (!Util.isUnset(request.dataSourceFilter)) {
    body['DataSourceFilter'] = request.dataSourceFilter;
  }
  if (!Util.isUnset(request.dataSourceIdList)) {
    body['DataSourceIdList'] = request.dataSourceIdList;
  }
  if (!Util.isUnset(request.dataSourceType)) {
    body['DataSourceType'] = request.dataSourceType;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.streamStatus)) {
    body['StreamStatus'] = request.streamStatus;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDataSources',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeDataSources(request: DescribeDataSourcesRequest): DescribeDataSourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDataSourcesWithOptions(request, runtime);
}

model DescribeDevicesRequest {
  corpIdList?: string(name='CorpIdList', example='2680957310292984065'),
  deviceIdList?: string(name='DeviceIdList', example='33011012011327999991'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='1'),
}

model DescribeDevicesResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNum?: int32(name='PageNum', example='1'),
    pageSize?: int32(name='PageSize', example='1'),
    records?: [ 
      {
        capturedPictureId?: string(name='CapturedPictureId', example='https://02820264041310183272/20201223/20201223144344.jpg'),
        corpId?: string(name='CorpId', example='2680957310292984065'),
        createTime?: string(name='CreateTime', example='2020-12-14 11:30:01'),
        deviceAddress?: string(name='DeviceAddress', example='""'),
        deviceId?: string(name='DeviceId', example='11011100991327001009'),
        deviceName?: string(name='DeviceName'),
        deviceType?: string(name='DeviceType', example='0'),
        inProtocol?: string(name='InProtocol', example='GBT28181'),
        latitude?: string(name='Latitude', example='30.111'),
        longitude?: string(name='Longitude', example='120.11'),
        password?: string(name='Password', example='123456'),
        status?: string(name='Status', example='offline'),
        vendor?: string(name='Vendor', example='99'),
      }
    ](name='Records'),
    totalCount?: int32(name='TotalCount', example='5'),
    totalPage?: int32(name='TotalPage', example='5'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='2ACE64FB-E16E-4382-82AD-D2BB396574EE'),
}

model DescribeDevicesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeDevicesResponseBody(name='body'),
}

async function describeDevicesWithOptions(request: DescribeDevicesRequest, runtime: Util.RuntimeOptions): DescribeDevicesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpIdList)) {
    body['CorpIdList'] = request.corpIdList;
  }
  if (!Util.isUnset(request.deviceIdList)) {
    body['DeviceIdList'] = request.deviceIdList;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeDevices',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeDevices(request: DescribeDevicesRequest): DescribeDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeDevicesWithOptions(request, runtime);
}

model DescribeIpcsRequest {
  corpIdList?: string(name='CorpIdList', example='100001****,100002****,100003****'),
  deviceFilter?: string(name='DeviceFilter', example='100001****'),
  deviceIdList?: string(name='DeviceIdList', example='100001****,100002****,100003****'),
  deviceStatus?: string(name='DeviceStatus', example='1'),
  nvrIdList?: string(name='NvrIdList', example='100001****,100002****,100003****'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  parentDeviceType?: string(name='ParentDeviceType', example='NVR'),
}

model DescribeIpcsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNum?: long(name='PageNum', example='1'),
    pageSize?: long(name='PageSize', example='10'),
    records?: [ 
      {
        audioEnable?: string(name='AudioEnable', example='1'),
        corpId?: string(name='CorpId', example='100001****'),
        createTime?: string(name='CreateTime', example='2021-08-26T12:31:22'),
        datasourceType?: string(name='DatasourceType', example='VIDEO'),
        deviceAddress?: string(name='DeviceAddress'),
        deviceDirection?: string(name='DeviceDirection'),
        deviceId?: string(name='DeviceId', example='33011012011327999****'),
        deviceIp?: string(name='DeviceIp', example='192.168.XX.XX'),
        deviceModel?: string(name='DeviceModel', example='ACube200-8'),
        deviceName?: string(name='DeviceName', example='example'),
        deviceRate?: string(name='DeviceRate', example='2048'),
        deviceResolution?: string(name='DeviceResolution', example='1920*1080'),
        deviceSite?: string(name='DeviceSite'),
        deviceSn?: string(name='DeviceSn', example='ca0e71642974****'),
        deviceStatus?: string(name='DeviceStatus', example='1'),
        deviceSubType?: string(name='DeviceSubType', example='1'),
        deviceType?: string(name='DeviceType', example='IPC'),
        encodeFormat?: string(name='EncodeFormat', example='6'),
        frameRate?: string(name='FrameRate', example='25'),
        govLength?: string(name='GovLength', example='50'),
        inProtocol?: string(name='InProtocol', example='GBT28181'),
        latitude?: string(name='Latitude', example='39.916527'),
        longitude?: string(name='Longitude', example='116.397128'),
        modifyTime?: string(name='ModifyTime', example='2021-08-26T12:31:22'),
        OSDTimeEnable?: string(name='OSDTimeEnable', example='1'),
        OSDTimeType?: string(name='OSDTimeType', example='1'),
        OSDTimeX?: string(name='OSDTimeX', example='99'),
        OSDTimeY?: string(name='OSDTimeY', example='1'),
        parentDeviceId?: string(name='ParentDeviceId', example='33011012011327999****'),
        password?: string(name='Password', example='******'),
        roi?: string(name='Roi'),
        serverId?: string(name='ServerId', example='330100990120****'),
        serverIp?: string(name='ServerIp', example='192.168.XX.XX'),
        serverPort?: string(name='ServerPort', example='5060'),
        serverRealm?: string(name='ServerRealm', example='2021****'),
        streamAction?: string(name='StreamAction', example='1'),
        streamStatus?: string(name='StreamStatus', example='1'),
        vap?: string(name='Vap'),
        vendor?: string(name='Vendor'),
      }
    ](name='Records'),
    totalCount?: long(name='TotalCount', example='32'),
    totalPage?: long(name='TotalPage', example='4'),
  }(name='Data'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model DescribeIpcsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeIpcsResponseBody(name='body'),
}

async function describeIpcsWithOptions(request: DescribeIpcsRequest, runtime: Util.RuntimeOptions): DescribeIpcsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpIdList)) {
    body['CorpIdList'] = request.corpIdList;
  }
  if (!Util.isUnset(request.deviceFilter)) {
    body['DeviceFilter'] = request.deviceFilter;
  }
  if (!Util.isUnset(request.deviceIdList)) {
    body['DeviceIdList'] = request.deviceIdList;
  }
  if (!Util.isUnset(request.deviceStatus)) {
    body['DeviceStatus'] = request.deviceStatus;
  }
  if (!Util.isUnset(request.nvrIdList)) {
    body['NvrIdList'] = request.nvrIdList;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.parentDeviceType)) {
    body['ParentDeviceType'] = request.parentDeviceType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeIpcs',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeIpcs(request: DescribeIpcsRequest): DescribeIpcsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeIpcsWithOptions(request, runtime);
}

model DescribeModelServiceRequest {
  modelServiceId?: string(name='ModelServiceId', example='abc'),
}

model DescribeModelServiceResponseBody = {
  code?: string(name='Code', example='0'),
  data?: {
    algorithmCode?: string(name='AlgorithmCode', example='2311243'),
    appCode?: string(name='AppCode', example='3f3e9316807842aa8e25a6d10fa77dd0'),
    createTime?: string(name='CreateTime', example='021-06-11 14:00:42'),
    modelApiList?: [ 
      {
        algorithmApiCode?: string(name='AlgorithmApiCode', example='3f3e9316807842aa8e25a6d10fa77dd0'),
        apiId?: string(name='ApiId', example='a7a51d29fadf40e8a8d1b0046a1bc253'),
        apiName?: string(name='ApiName', example='MockApi1'),
        apiPath?: string(name='ApiPath', example='http://apigateway.aliyunvcs.cn/compute/raw/5d8b904b-dcb7-432d-b730-fcd7af083999/mock/api/9387534b-d6aa-404c-84fb-7c108343f410'),
        createTime?: string(name='CreateTime', example='2021-06-11T14:00:42+08:00'),
      }
    ](name='ModelApiList'),
    modelServiceInstanceId?: string(name='ModelServiceInstanceId', example='46329898'),
    modelServiceInstanceName?: string(name='ModelServiceInstanceName', example='ModelService'),
    modelServiceStatus?: string(name='ModelServiceStatus', example='Init'),
    qps?: long(name='Qps', description='Qps。', example='100'),
  }(name='Data'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', description='Id of the request', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model DescribeModelServiceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeModelServiceResponseBody(name='body'),
}

async function describeModelServiceWithOptions(request: DescribeModelServiceRequest, runtime: Util.RuntimeOptions): DescribeModelServiceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.modelServiceId)) {
    body['ModelServiceId'] = request.modelServiceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeModelService',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeModelService(request: DescribeModelServiceRequest): DescribeModelServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeModelServiceWithOptions(request, runtime);
}

model DescribeModelServiceListRequest {
  algorithmCode?: string(name='AlgorithmCode', example='4363023202536917761001'),
  includeDeleted?: boolean(name='IncludeDeleted', example='true'),
  modelServiceName?: string(name='ModelServiceName', example='test'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model DescribeModelServiceListResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  data?: {
    modelList?: [ 
      {
        algorithmCode?: string(name='AlgorithmCode', example='2311243'),
        appCode?: string(name='AppCode', example='3f3e9316807842aa8e25a6d10fa77dd0'),
        createTime?: string(name='CreateTime', example='021-06-11 14:00:42'),
        modelServiceInstanceId?: string(name='ModelServiceInstanceId', example='46329898'),
        modelServiceName?: string(name='ModelServiceName', example='ModelService'),
        modelServiceStatus?: string(name='ModelServiceStatus', example='Init'),
        qpsRequired?: int32(name='QpsRequired', example='100'),
      }
    ](name='ModelList'),
    total?: string(name='Total', example='10'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='97228086-192F-5699-A8A7-348C83EE17B7'),
}

model DescribeModelServiceListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeModelServiceListResponseBody(name='body'),
}

async function describeModelServiceListWithOptions(request: DescribeModelServiceListRequest, runtime: Util.RuntimeOptions): DescribeModelServiceListResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmCode)) {
    body['AlgorithmCode'] = request.algorithmCode;
  }
  if (!Util.isUnset(request.includeDeleted)) {
    body['IncludeDeleted'] = request.includeDeleted;
  }
  if (!Util.isUnset(request.modelServiceName)) {
    body['ModelServiceName'] = request.modelServiceName;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeModelServiceList',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeModelServiceList(request: DescribeModelServiceListRequest): DescribeModelServiceListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeModelServiceListWithOptions(request, runtime);
}

model DescribeNvrDevicesRequest {
  corpIdList?: string(name='CorpIdList'),
  deviceFilter?: string(name='DeviceFilter'),
  nvrDeviceIdList?: string(name='NvrDeviceIdList'),
  pageNum?: long(name='PageNum'),
  pageSize?: long(name='PageSize'),
}

model DescribeNvrDevicesResponseBody = {
  code?: string(name='Code'),
  data?: {
    pageNum?: long(name='PageNum'),
    pageSize?: long(name='PageSize'),
    records?: [ 
      {
        channel?: string(name='Channel'),
        corpId?: string(name='CorpId'),
        createTime?: string(name='CreateTime'),
        datasourceType?: string(name='DatasourceType'),
        deviceId?: string(name='DeviceId'),
        deviceModel?: string(name='DeviceModel'),
        deviceName?: string(name='DeviceName'),
        deviceSn?: string(name='DeviceSn'),
        deviceStatus?: string(name='DeviceStatus'),
        deviceType?: string(name='DeviceType'),
        modifyTime?: string(name='ModifyTime'),
        projectName?: string(name='ProjectName'),
        regionName?: string(name='RegionName'),
      }
    ](name='Records'),
    totalCount?: long(name='TotalCount'),
    totalPage?: long(name='TotalPage'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DescribeNvrDevicesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeNvrDevicesResponseBody(name='body'),
}

/**
  * @deprecated
  *
  * @param request DescribeNvrDevicesRequest
  * @param runtime runtime options for this request RuntimeOptions
  * @return DescribeNvrDevicesResponse
 */
// Deprecated
async function describeNvrDevicesWithOptions(request: DescribeNvrDevicesRequest, runtime: Util.RuntimeOptions): DescribeNvrDevicesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpIdList)) {
    body['CorpIdList'] = request.corpIdList;
  }
  if (!Util.isUnset(request.deviceFilter)) {
    body['DeviceFilter'] = request.deviceFilter;
  }
  if (!Util.isUnset(request.nvrDeviceIdList)) {
    body['NvrDeviceIdList'] = request.nvrDeviceIdList;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeNvrDevices',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
  * @deprecated
  *
  * @param request DescribeNvrDevicesRequest
  * @return DescribeNvrDevicesResponse
 */
// Deprecated
async function describeNvrDevices(request: DescribeNvrDevicesRequest): DescribeNvrDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeNvrDevicesWithOptions(request, runtime);
}

model DescribeNvrsRequest {
  corpIdList?: string(name='CorpIdList', example='323153238989734****'),
  deviceFilter?: string(name='DeviceFilter', example='100001****'),
  nvrDeviceIdList?: string(name='NvrDeviceIdList', example='1372771321890****'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='5'),
}

model DescribeNvrsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNum?: long(name='PageNum', example='1'),
    pageSize?: long(name='PageSize', example='10'),
    records?: [ 
      {
        corpId?: string(name='CorpId', example='323153238989734****'),
        createTime?: string(name='CreateTime', example='2021-08-26T12:31:22'),
        datasourceType?: string(name='DatasourceType', example='VIDEO'),
        deviceAddress?: string(name='DeviceAddress'),
        deviceId?: string(name='DeviceId', example='3301220100200000**********'),
        deviceModel?: string(name='DeviceModel', example='ACube200-8'),
        deviceName?: string(name='DeviceName'),
        deviceSn?: string(name='DeviceSn', example='a2374ea48186****'),
        deviceStatus?: string(name='DeviceStatus', example='1'),
        deviceType?: string(name='DeviceType', example='NVR'),
        inProtocol?: string(name='InProtocol', example='GBT28181'),
        latitude?: string(name='Latitude', example='39.916527'),
        longitude?: string(name='Longitude', example='116.397128'),
        modifyTime?: string(name='ModifyTime', example='2021-08-26T12:31:22'),
        password?: string(name='Password', example='******'),
        serverId?: string(name='ServerId', example='330100990120****'),
        serverIp?: string(name='ServerIp', example='192.168.XX.XX'),
        serverPort?: string(name='ServerPort', example='5060'),
        serverRealm?: string(name='ServerRealm', example='2021****'),
        subDeviceCount?: string(name='SubDeviceCount', example='8'),
        subDeviceInfo?: [ 
          {
            subDeviceId?: string(name='SubDeviceId', example='33011012011327999****'),
          }
        ](name='SubDeviceInfo'),
        vendor?: string(name='Vendor'),
      }
    ](name='Records'),
    totalCount?: long(name='TotalCount', example='32'),
    totalPage?: long(name='TotalPage', example='4'),
  }(name='Data'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model DescribeNvrsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeNvrsResponseBody(name='body'),
}

async function describeNvrsWithOptions(request: DescribeNvrsRequest, runtime: Util.RuntimeOptions): DescribeNvrsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpIdList)) {
    body['CorpIdList'] = request.corpIdList;
  }
  if (!Util.isUnset(request.deviceFilter)) {
    body['DeviceFilter'] = request.deviceFilter;
  }
  if (!Util.isUnset(request.nvrDeviceIdList)) {
    body['NvrDeviceIdList'] = request.nvrDeviceIdList;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeNvrs',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeNvrs(request: DescribeNvrsRequest): DescribeNvrsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeNvrsWithOptions(request, runtime);
}

model DescribeSearchItemsRequest {
  pageNumber?: string(name='PageNumber'),
  pageSize?: string(name='PageSize'),
  searchItemIds?: string(name='SearchItemIds'),
  searchTableId?: string(name='SearchTableId'),
}

model DescribeSearchItemsResponseBody = {
  code?: string(name='Code'),
  data?: {
    pageNumber?: string(name='PageNumber'),
    pageSize?: string(name='PageSize'),
    records?: [ 
      {
        itemImageUrl?: string(name='ItemImageUrl'),
        searchItemId?: string(name='SearchItemId'),
        searchItemName?: string(name='SearchItemName'),
      }
    ](name='Records'),
    totalCount?: string(name='TotalCount'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: string(name='Success'),
}

model DescribeSearchItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeSearchItemsResponseBody(name='body'),
}

async function describeSearchItemsWithOptions(request: DescribeSearchItemsRequest, runtime: Util.RuntimeOptions): DescribeSearchItemsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.searchItemIds)) {
    body['SearchItemIds'] = request.searchItemIds;
  }
  if (!Util.isUnset(request.searchTableId)) {
    body['SearchTableId'] = request.searchTableId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSearchItems',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeSearchItems(request: DescribeSearchItemsRequest): DescribeSearchItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSearchItemsWithOptions(request, runtime);
}

model DescribeSearchTablesRequest {
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  searchTableIds?: string(name='SearchTableIds'),
}

model DescribeSearchTablesResponseBody = {
  code?: string(name='Code'),
  data?: {
    pageNumbei?: long(name='PageNumbei'),
    pageSize?: long(name='PageSize'),
    records?: [ 
      {
        algorithmId?: string(name='AlgorithmId'),
        searchTableId?: string(name='SearchTableId'),
        searchTableName?: string(name='SearchTableName'),
        targetType?: string(name='TargetType'),
      }
    ](name='Records'),
    totalCount?: long(name='TotalCount'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: string(name='Success'),
}

model DescribeSearchTablesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeSearchTablesResponseBody(name='body'),
}

async function describeSearchTablesWithOptions(request: DescribeSearchTablesRequest, runtime: Util.RuntimeOptions): DescribeSearchTablesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.searchTableIds)) {
    body['SearchTableIds'] = request.searchTableIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeSearchTables',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeSearchTables(request: DescribeSearchTablesRequest): DescribeSearchTablesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSearchTablesWithOptions(request, runtime);
}

model DescribeWatchItemsRequest {
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  watchItemIds?: string(name='WatchItemIds', example='["30f6XXXX","7c2eXXXX","b4a1XXXX"]'),
  watchPolicyId?: string(name='WatchPolicyId', example='300f7e67c82e42b48a197894f512343b'),
}

model DescribeWatchItemsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNumber?: long(name='PageNumber', example='1'),
    pageSize?: long(name='PageSize', example='10'),
    records?: [ 
      {
        itemAttributes?: string(name='ItemAttributes', example='String	[	{  "Key":"HairColor", 	"Value":["4","1"], 	"Score":0.81	 }, 	{  "Key":"GenderCode",   "Value":["1"],   "Score":0.92 	}]'),
        itemImageUrl?: string(name='ItemImageUrl', example='http:/www.aliyun.com/file2'),
        watchItemId?: string(name='WatchItemId', example='30f6XXXX'),
        watchItemName?: string(name='WatchItemName', example='example'),
      }
    ](name='Records'),
    totalCount?: long(name='TotalCount', example='32'),
  }(name='Data'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
}

model DescribeWatchItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeWatchItemsResponseBody(name='body'),
}

async function describeWatchItemsWithOptions(request: DescribeWatchItemsRequest, runtime: Util.RuntimeOptions): DescribeWatchItemsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.watchItemIds)) {
    body['WatchItemIds'] = request.watchItemIds;
  }
  if (!Util.isUnset(request.watchPolicyId)) {
    body['WatchPolicyId'] = request.watchPolicyId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeWatchItems',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeWatchItems(request: DescribeWatchItemsRequest): DescribeWatchItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeWatchItemsWithOptions(request, runtime);
}

model DescribeWatchPoliciesRequest {
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  watchPolicyIds?: string(name='WatchPolicyIds', example='["30fXXXX","7c8XXXX","b48XXXX"]'),
}

model DescribeWatchPoliciesResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNumber?: long(name='PageNumber', example='1'),
    pageSize?: long(name='PageSize', example='10'),
    records?: [ 
      {
        itemMatchType?: string(name='ItemMatchType', example='ByAttributes'),
        similarityThreshold?: double(name='SimilarityThreshold', example='0.92'),
        targetType?: string(name='TargetType', example='Event'),
        watchMode?: string(name='WatchMode', example='NotifyIfInList'),
        watchPolicyId?: string(name='WatchPolicyId', example='300f7e67c82e42b48a197894f512343b'),
        watchPolicyName?: string(name='WatchPolicyName', example='example'),
      }
    ](name='Records'),
    totalCount?: long(name='TotalCount', example='32'),
  }(name='Data'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BADA5C5D0986'),
  success?: boolean(name='Success', example='true'),
}

model DescribeWatchPoliciesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeWatchPoliciesResponseBody(name='body'),
}

async function describeWatchPoliciesWithOptions(request: DescribeWatchPoliciesRequest, runtime: Util.RuntimeOptions): DescribeWatchPoliciesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.watchPolicyIds)) {
    body['WatchPolicyIds'] = request.watchPolicyIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeWatchPolicies',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeWatchPolicies(request: DescribeWatchPoliciesRequest): DescribeWatchPoliciesResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeWatchPoliciesWithOptions(request, runtime);
}

model DescribeWatchTasksRequest {
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  watchTaskIds?: string(name='WatchTaskIds', example='["C1DAXXXX", "C5D0XXXX"]'),
}

model DescribeWatchTasksResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNumber?: long(name='PageNumber', example='1'),
    pageSize?: long(name='PageSize', example='10'),
    records?: [ 
      {
        corpId?: string(name='CorpId', example='44B0E0XXXX'),
        description?: string(name='Description'),
        deviceList?: string(name='DeviceList', example='["1C44674CC97AXXXX", "915E4ACA5866XXXX"]'),
        messageReceiver?: string(name='MessageReceiver', example='{   "MessageQueue": "Kafka",   "Config": {     "BootstrapServers": "127.0.0.1:9092,127.0.0.2:9092",     "Topic": "topic_for_put_message",     "Authorization": "SASL",     "SASL": {       "Type": "PLAIN",       "Username": "username_for_put_message"     }   } }'),
        scheduleCycleDates?: string(name='ScheduleCycleDates', example='[1, 4, 6]'),
        scheduleTimes?: string(name='ScheduleTimes', example='[{"StartTime":"10:00:00","EndTime":"11:00:00"}]'),
        scheduleType?: string(name='ScheduleType', example='EVERYDAY'),
        taskName?: string(name='TaskName', example='example'),
        watchPolicyIds?: string(name='WatchPolicyIds', example='["30fXXXX","7c8XXXX","b48XXXX"]'),
        watchTaskId?: string(name='WatchTaskId', example='304E63XXXX'),
      }
    ](name='Records'),
    totalCount?: long(name='TotalCount', example='10'),
  }(name='Data'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
}

model DescribeWatchTasksResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeWatchTasksResponseBody(name='body'),
}

async function describeWatchTasksWithOptions(request: DescribeWatchTasksRequest, runtime: Util.RuntimeOptions): DescribeWatchTasksResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.watchTaskIds)) {
    body['WatchTaskIds'] = request.watchTaskIds;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribeWatchTasks',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeWatchTasks(request: DescribeWatchTasksRequest): DescribeWatchTasksResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeWatchTasksWithOptions(request, runtime);
}

model DescribesDoubleVerificationGroupsRequest {
  doubleVerificationGroupIds?: string(name='DoubleVerificationGroupIds'),
  id?: string(name='Id'),
  pageNum?: long(name='PageNum'),
  pageSize?: long(name='PageSize'),
}

model DescribesDoubleVerificationGroupsResponseBody = {
  code?: string(name='Code'),
  doubleVerificationGroups?: {
    doubleVerificationGroupList?: [ 
      {
        deviceId?: string(name='DeviceId'),
        enabled?: string(name='Enabled'),
        groupId?: string(name='GroupId'),
        interval?: long(name='Interval'),
        lastChange?: string(name='LastChange'),
        memberNumber?: long(name='MemberNumber'),
        personIdList?: [ 
          {
            personId?: string(name='PersonId'),
            personTableId?: string(name='PersonTableId'),
          }
        ](name='PersonIdList'),
      }
    ](name='DoubleVerificationGroupList'),
    pageNum?: long(name='PageNum'),
    pageSize?: long(name='PageSize'),
    totalNum?: long(name='TotalNum'),
  }(name='DoubleVerificationGroups'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model DescribesDoubleVerificationGroupsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribesDoubleVerificationGroupsResponseBody(name='body'),
}

async function describesDoubleVerificationGroupsWithOptions(request: DescribesDoubleVerificationGroupsRequest, runtime: Util.RuntimeOptions): DescribesDoubleVerificationGroupsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.doubleVerificationGroupIds)) {
    body['DoubleVerificationGroupIds'] = request.doubleVerificationGroupIds;
  }
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DescribesDoubleVerificationGroups',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describesDoubleVerificationGroups(request: DescribesDoubleVerificationGroupsRequest): DescribesDoubleVerificationGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describesDoubleVerificationGroupsWithOptions(request, runtime);
}

model EchoStatusResponseBody = {
  requestId?: string(name='RequestId'),
}

model EchoStatusResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: EchoStatusResponseBody(name='body'),
}

async function echoStatusWithOptions(runtime: Util.RuntimeOptions): EchoStatusResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'EchoStatus',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function echoStatus(): EchoStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return echoStatusWithOptions(runtime);
}

model GetAiotStorageInfoResponseBody = {
  aiotStorageInfo?: {
    eventAlarmMq?: {
      alarmTopic?: string(name='AlarmTopic'),
      eventTopic?: string(name='EventTopic'),
      instanceId?: string(name='InstanceId'),
      mqType?: string(name='MqType'),
      ramArnRole?: string(name='RamArnRole'),
      regionId?: string(name='RegionId'),
    }(name='EventAlarmMq'),
    eventAlarmPictureStorage?: {
      bucket?: string(name='Bucket'),
      endpoint?: string(name='Endpoint'),
      path?: string(name='Path'),
      proxy?: string(name='Proxy'),
      ramArnRole?: string(name='RamArnRole'),
      storageType?: string(name='StorageType'),
    }(name='EventAlarmPictureStorage'),
  }(name='AiotStorageInfo'),
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetAiotStorageInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetAiotStorageInfoResponseBody(name='body'),
}

async function getAiotStorageInfoWithOptions(runtime: Util.RuntimeOptions): GetAiotStorageInfoResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'GetAiotStorageInfo',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getAiotStorageInfo(): GetAiotStorageInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAiotStorageInfoWithOptions(runtime);
}

model GetBodyOptionsRequest {
  corpId?: string(name='CorpId'),
}

model GetBodyOptionsResponseBody = {
  code?: string(name='Code'),
  data?: [ 
    {
      key?: string(name='Key'),
      name?: string(name='Name'),
      optionList?: [ 
        {
          key?: string(name='Key'),
          name?: string(name='Name'),
        }
      ](name='OptionList'),
    }
  ](name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetBodyOptionsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetBodyOptionsResponseBody(name='body'),
}

/**
  * @deprecated
  *
  * @param request GetBodyOptionsRequest
  * @param runtime runtime options for this request RuntimeOptions
  * @return GetBodyOptionsResponse
 */
// Deprecated
async function getBodyOptionsWithOptions(request: GetBodyOptionsRequest, runtime: Util.RuntimeOptions): GetBodyOptionsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetBodyOptions',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
  * @deprecated
  *
  * @param request GetBodyOptionsRequest
  * @return GetBodyOptionsResponse
 */
// Deprecated
async function getBodyOptions(request: GetBodyOptionsRequest): GetBodyOptionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getBodyOptionsWithOptions(request, runtime);
}

model GetCatalogListRequest {
  corpId?: string(name='CorpId'),
  isvSubId?: string(name='IsvSubId'),
}

model GetCatalogListResponseBody = {
  code?: string(name='Code'),
  data?: [ 
    {
      catalogId?: long(name='CatalogId'),
      catalogName?: string(name='CatalogName'),
      isvSubId?: string(name='IsvSubId'),
      parentCatalogId?: long(name='ParentCatalogId'),
      profileCount?: long(name='ProfileCount'),
    }
  ](name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetCatalogListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetCatalogListResponseBody(name='body'),
}

async function getCatalogListWithOptions(request: GetCatalogListRequest, runtime: Util.RuntimeOptions): GetCatalogListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.corpId)) {
    query['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.isvSubId)) {
    query['IsvSubId'] = request.isvSubId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetCatalogList',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getCatalogList(request: GetCatalogListRequest): GetCatalogListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCatalogListWithOptions(request, runtime);
}

model GetCityCodeResponseBody = {
  code?: string(name='Code', example='200'),
  data?: [ 
    {
      cityAddress?: string(name='CityAddress'),
      cityCode?: string(name='CityCode', example='310000'),
    }
  ](name='Data'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='2ACE64FB-E16E-4382-82AD-D2BB396574EE'),
}

model GetCityCodeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetCityCodeResponseBody(name='body'),
}

async function getCityCodeWithOptions(runtime: Util.RuntimeOptions): GetCityCodeResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'GetCityCode',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getCityCode(): GetCityCodeResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCityCodeWithOptions(runtime);
}

model GetDataSourceStatsRequest {
  corpIdList?: string(name='CorpIdList', example='2802219370309225986'),
  dataSourceType?: string(name='DataSourceType', example='VIDEO'),
}

model GetDataSourceStatsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: [ 
    {
      dataSourceType?: string(name='DataSourceType', example='VIDEO'),
      items?: map[string]any(name='Items', example='{         "ONLINE": 1，         "OFFLINE": 9       }'),
      total?: long(name='Total', example='10'),
    }
  ](name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
}

model GetDataSourceStatsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDataSourceStatsResponseBody(name='body'),
}

async function getDataSourceStatsWithOptions(request: GetDataSourceStatsRequest, runtime: Util.RuntimeOptions): GetDataSourceStatsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpIdList)) {
    body['CorpIdList'] = request.corpIdList;
  }
  if (!Util.isUnset(request.dataSourceType)) {
    body['DataSourceType'] = request.dataSourceType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDataSourceStats',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDataSourceStats(request: GetDataSourceStatsRequest): GetDataSourceStatsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDataSourceStatsWithOptions(request, runtime);
}

model GetDeviceCaptureStrategyRequest {
  deviceCode?: string(name='DeviceCode', example='33010600991327000049'),
  deviceType?: string(name='DeviceType', example='IPC'),
}

model GetDeviceCaptureStrategyResponseBody = {
  code?: string(name='Code', example='0'),
  data?: {
    deviceCode?: string(name='DeviceCode', example='33010600991327000049'),
    deviceType?: string(name='DeviceType', example='IPC'),
    fridayCaptureStrategy?: string(name='FridayCaptureStrategy', example='00:00-24:00|1|7'),
    mondayCaptureStrategy?: string(name='MondayCaptureStrategy', example='00:00-24:00|1|7'),
    saturdayCaptureStrategy?: string(name='SaturdayCaptureStrategy', example='00:00-24:00|1|7'),
    sundayCaptureStrategy?: string(name='SundayCaptureStrategy', example='00:00-24:00|1|7'),
    thursdayCaptureStrategy?: string(name='ThursdayCaptureStrategy', example='00:00-24:00|1|7'),
    tuesdayCaptureStrategy?: string(name='TuesdayCaptureStrategy', example='00:00-24:00|1|7'),
    wednesdayCaptureStrategy?: string(name='WednesdayCaptureStrategy', example='00:00-24:00|1|7'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model GetDeviceCaptureStrategyResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDeviceCaptureStrategyResponseBody(name='body'),
}

async function getDeviceCaptureStrategyWithOptions(request: GetDeviceCaptureStrategyRequest, runtime: Util.RuntimeOptions): GetDeviceCaptureStrategyResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceCode)) {
    body['DeviceCode'] = request.deviceCode;
  }
  if (!Util.isUnset(request.deviceType)) {
    body['DeviceType'] = request.deviceType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceCaptureStrategy',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDeviceCaptureStrategy(request: GetDeviceCaptureStrategyRequest): GetDeviceCaptureStrategyResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceCaptureStrategyWithOptions(request, runtime);
}

model GetDeviceConfigRequest {
  deviceSn?: string(name='DeviceSn', example='210235C41T320400****'),
  deviceTimeStamp?: string(name='DeviceTimeStamp', example='1595837187'),
}

model GetDeviceConfigResponseBody = {
  audioEnable?: string(name='AudioEnable', example='1'),
  audioFormat?: string(name='AudioFormat', example='6'),
  bitRate?: string(name='BitRate', example='2048'),
  channelList?: [ 
    {
      channelGbId?: string(name='ChannelGbId', example='3101010099217000****'),
      fridayCaptureStrategy?: string(name='FridayCaptureStrategy', example='xx'),
      mondayCaptureStrategy?: string(name='MondayCaptureStrategy', example='xx'),
      saturdayCaptureStrategy?: string(name='SaturdayCaptureStrategy', example='xx'),
      sundayCaptureStrategy?: string(name='SundayCaptureStrategy', example='xx'),
      thursdayCaptureStrategy?: string(name='ThursdayCaptureStrategy', example='xx'),
      tuesdayCaptureStrategy?: string(name='TuesdayCaptureStrategy', example='xx'),
      wednesdayCaptureStrategy?: string(name='WednesdayCaptureStrategy', example='xx'),
    }
  ](name='ChannelList'),
  code?: string(name='Code', example='200'),
  deviceAddress?: string(name='DeviceAddress'),
  deviceId?: string(name='DeviceId', example='0757740611131545****'),
  deviceName?: string(name='DeviceName'),
  encodeFormat?: string(name='EncodeFormat', example='6'),
  frameRate?: string(name='FrameRate', example='25'),
  govLength?: long(name='GovLength', example='50'),
  latitude?: string(name='Latitude', example='30.892281'),
  longitude?: string(name='Longitude', example='116.397128'),
  message?: string(name='Message', example='success'),
  OSDList?: [ 
    {
      leftTopX?: string(name='LeftTopX', example='10'),
      leftTopY?: string(name='LeftTopY', example='10'),
      text?: string(name='Text'),
    }
  ](name='OSDList'),
  OSDTimeEnable?: string(name='OSDTimeEnable', example='1'),
  OSDTimeType?: string(name='OSDTimeType', example='2'),
  OSDTimeX?: string(name='OSDTimeX', example='99'),
  OSDTimeY?: string(name='OSDTimeY', example='1'),
  passWord?: string(name='PassWord', example='123456'),
  protocol?: string(name='Protocol', example='GB28181'),
  requestId?: string(name='RequestId', example='04C96A61-C669-5A7B-877D-09235C335FD2'),
  resolution?: string(name='Resolution', example='1920*1080'),
  retryInterval?: string(name='RetryInterval', example='300'),
  serverId?: string(name='ServerId', example='3101010099217000****'),
  serverIp?: string(name='ServerIp', example='10.244.145.177'),
  serverPort?: string(name='ServerPort', example='80'),
  userName?: string(name='UserName', example='root'),
}

model GetDeviceConfigResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDeviceConfigResponseBody(name='body'),
}

async function getDeviceConfigWithOptions(request: GetDeviceConfigRequest, runtime: Util.RuntimeOptions): GetDeviceConfigResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceSn)) {
    body['DeviceSn'] = request.deviceSn;
  }
  if (!Util.isUnset(request.deviceTimeStamp)) {
    body['DeviceTimeStamp'] = request.deviceTimeStamp;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceConfig',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDeviceConfig(request: GetDeviceConfigRequest): GetDeviceConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceConfigWithOptions(request, runtime);
}

model GetDeviceCountRequest {
  upStreamMode?: string(name='UpStreamMode'),
}

model GetDeviceCountResponseBody = {
  code?: string(name='Code'),
  data?: {
    deviceCount?: long(name='DeviceCount'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetDeviceCountResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDeviceCountResponseBody(name='body'),
}

async function getDeviceCountWithOptions(request: GetDeviceCountRequest, runtime: Util.RuntimeOptions): GetDeviceCountResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.upStreamMode)) {
    body['UpStreamMode'] = request.upStreamMode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceCount',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDeviceCount(request: GetDeviceCountRequest): GetDeviceCountResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceCountWithOptions(request, runtime);
}

model GetDeviceLiveUrlRequest {
  corpId?: string(name='CorpId', example='10001****'),
  deviceId?: string(name='DeviceId', example='0757740611131545****'),
  gbId?: string(name='GbId', example='0757740611131545****'),
  outProtocol?: string(name='OutProtocol', example='hls'),
  streamType?: string(name='StreamType', example='1'),
}

model GetDeviceLiveUrlResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='Success'),
  outProtocol?: string(name='OutProtocol', example='hls'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  streamType?: long(name='StreamType', example='1'),
  url?: string(name='Url', example='http://example.com/xxx'),
}

model GetDeviceLiveUrlResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDeviceLiveUrlResponseBody(name='body'),
}

async function getDeviceLiveUrlWithOptions(request: GetDeviceLiveUrlRequest, runtime: Util.RuntimeOptions): GetDeviceLiveUrlResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.gbId)) {
    body['GbId'] = request.gbId;
  }
  if (!Util.isUnset(request.outProtocol)) {
    body['OutProtocol'] = request.outProtocol;
  }
  if (!Util.isUnset(request.streamType)) {
    body['StreamType'] = request.streamType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceLiveUrl',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDeviceLiveUrl(request: GetDeviceLiveUrlRequest): GetDeviceLiveUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceLiveUrlWithOptions(request, runtime);
}

model GetDevicePictureRequest {
  deviceId?: string(name='DeviceId', example='1101050001132700****'),
}

model GetDevicePictureResponseBody = {
  code?: string(name='Code', example='200'),
  data?: string(name='Data', example='http://example.com/example.jpg'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model GetDevicePictureResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDevicePictureResponseBody(name='body'),
}

async function getDevicePictureWithOptions(request: GetDevicePictureRequest, runtime: Util.RuntimeOptions): GetDevicePictureResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDevicePicture',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDevicePicture(request: GetDevicePictureRequest): GetDevicePictureResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDevicePictureWithOptions(request, runtime);
}

model GetDeviceStatsRequest {
  corpIdList?: string(name='CorpIdList', example='3926773946225002375'),
  deviceStatus?: string(name='DeviceStatus', example='0'),
  deviceType?: string(name='DeviceType', example='IPC'),
}

model GetDeviceStatsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: [ 
    {
      count?: long(name='Count', example='10'),
      deviceStatus?: string(name='DeviceStatus', example='1'),
      deviceType?: string(name='DeviceType', example='IPC'),
    }
  ](name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='58144438-C0EA-1AC6-8A64-E1F16DE6CD8B'),
}

model GetDeviceStatsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDeviceStatsResponseBody(name='body'),
}

async function getDeviceStatsWithOptions(request: GetDeviceStatsRequest, runtime: Util.RuntimeOptions): GetDeviceStatsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpIdList)) {
    body['CorpIdList'] = request.corpIdList;
  }
  if (!Util.isUnset(request.deviceStatus)) {
    body['DeviceStatus'] = request.deviceStatus;
  }
  if (!Util.isUnset(request.deviceType)) {
    body['DeviceType'] = request.deviceType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceStats',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDeviceStats(request: GetDeviceStatsRequest): GetDeviceStatsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceStatsWithOptions(request, runtime);
}

model GetDeviceVideoUrlRequest {
  corpId?: string(name='CorpId', example='252060345870948****'),
  deviceId?: string(name='DeviceId', example='1101050001132700****'),
  endTime?: long(name='EndTime', example='1600081668000'),
  gbId?: string(name='GbId', example='1101050001132700****'),
  outProtocol?: string(name='OutProtocol', example='hls'),
  startTime?: long(name='StartTime', example='1599807533000'),
  storageType?: string(name='StorageType', example='0'),
}

model GetDeviceVideoUrlResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='Success'),
  outProtocol?: string(name='OutProtocol', example='hls'),
  requestId?: string(name='RequestId', example='08ebc43f_a815_4ba2_8920_c113b60c66a4'),
  url?: string(name='Url', example='http://example.com/xxx'),
}

model GetDeviceVideoUrlResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetDeviceVideoUrlResponseBody(name='body'),
}

async function getDeviceVideoUrlWithOptions(request: GetDeviceVideoUrlRequest, runtime: Util.RuntimeOptions): GetDeviceVideoUrlResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.gbId)) {
    body['GbId'] = request.gbId;
  }
  if (!Util.isUnset(request.outProtocol)) {
    body['OutProtocol'] = request.outProtocol;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.storageType)) {
    body['StorageType'] = request.storageType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceVideoUrl',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getDeviceVideoUrl(request: GetDeviceVideoUrlRequest): GetDeviceVideoUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDeviceVideoUrlWithOptions(request, runtime);
}

model GetFaceModelResultRequest {
  pictureContent?: string(name='PictureContent'),
  pictureId?: string(name='PictureId'),
  pictureUrl?: string(name='PictureUrl'),
}

model GetFaceModelResultResponseBody = {
  code?: string(name='Code'),
  data?: {
    records?: [ 
      {
        ageLowerLimit?: int32(name='AgeLowerLimit'),
        ageLowerLimitReliability?: string(name='AgeLowerLimitReliability'),
        ageUpLimit?: int32(name='AgeUpLimit'),
        ageUpLimitReliability?: string(name='AgeUpLimitReliability'),
        capColor?: int32(name='CapColor'),
        capColorReliability?: string(name='CapColorReliability'),
        capStyle?: int32(name='CapStyle'),
        capStyleReliability?: string(name='CapStyleReliability'),
        ethicCode?: int32(name='EthicCode'),
        ethicCodeReliability?: string(name='EthicCodeReliability'),
        faceStyle?: string(name='FaceStyle'),
        faceStyleReliability?: string(name='FaceStyleReliability'),
        featureData?: [ float ](name='FeatureData'),
        genderCode?: int32(name='GenderCode'),
        genderCodeReliability?: string(name='GenderCodeReliability'),
        glassColor?: int32(name='GlassColor'),
        glassColorReliability?: string(name='GlassColorReliability'),
        glassStyle?: int32(name='GlassStyle'),
        glassStyleReliability?: string(name='GlassStyleReliability'),
        hairColor?: int32(name='HairColor'),
        hairColorReliability?: string(name='HairColorReliability'),
        hairStyle?: int32(name='HairStyle'),
        hairStyleReliability?: string(name='HairStyleReliability'),
        leftTopX?: float(name='LeftTopX'),
        leftTopY?: float(name='LeftTopY'),
        mustacheStyle?: string(name='MustacheStyle'),
        mustacheStyleReliability?: string(name='MustacheStyleReliability'),
        respiratorColor?: int32(name='RespiratorColor'),
        respiratorColorReliability?: string(name='RespiratorColorReliability'),
        rightBottomX?: float(name='RightBottomX'),
        rightBottomY?: float(name='RightBottomY'),
        skinColor?: int32(name='SkinColor'),
        skinColorReliability?: string(name='SkinColorReliability'),
      }
    ](name='Records'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetFaceModelResultResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetFaceModelResultResponseBody(name='body'),
}

async function getFaceModelResultWithOptions(request: GetFaceModelResultRequest, runtime: Util.RuntimeOptions): GetFaceModelResultResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.pictureContent)) {
    body['PictureContent'] = request.pictureContent;
  }
  if (!Util.isUnset(request.pictureId)) {
    body['PictureId'] = request.pictureId;
  }
  if (!Util.isUnset(request.pictureUrl)) {
    body['PictureUrl'] = request.pictureUrl;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetFaceModelResult',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getFaceModelResult(request: GetFaceModelResultRequest): GetFaceModelResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return getFaceModelResultWithOptions(request, runtime);
}

model GetFaceOptionsRequest {
  corpId?: string(name='CorpId'),
}

model GetFaceOptionsResponseBody = {
  code?: string(name='Code'),
  data?: [ 
    {
      key?: string(name='Key'),
      name?: string(name='Name'),
      optionList?: [ 
        {
          key?: string(name='Key'),
          name?: string(name='Name'),
        }
      ](name='OptionList'),
    }
  ](name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetFaceOptionsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetFaceOptionsResponseBody(name='body'),
}

/**
  * @deprecated
  *
  * @param request GetFaceOptionsRequest
  * @param runtime runtime options for this request RuntimeOptions
  * @return GetFaceOptionsResponse
 */
// Deprecated
async function getFaceOptionsWithOptions(request: GetFaceOptionsRequest, runtime: Util.RuntimeOptions): GetFaceOptionsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetFaceOptions',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
  * @deprecated
  *
  * @param request GetFaceOptionsRequest
  * @return GetFaceOptionsResponse
 */
// Deprecated
async function getFaceOptions(request: GetFaceOptionsRequest): GetFaceOptionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getFaceOptionsWithOptions(request, runtime);
}

model GetInventoryRequest {
  commodityCode?: string(name='CommodityCode'),
}

model GetInventoryResponseBody = {
  data?: {
    resultObject?: [ 
      {
        buyerId?: string(name='BuyerId', example='32121321321'),
        commodityCode?: string(name='CommodityCode'),
        currentInventory?: string(name='CurrentInventory', example='11'),
        instanceId?: string(name='InstanceId', example='dsadasd1111'),
        inventoryId?: string(name='InventoryId', example='111111'),
        validEndTime?: string(name='ValidEndTime'),
        validStartTime?: string(name='ValidStartTime'),
      }
    ](name='ResultObject'),
  }(name='Data'),
  success?: boolean(name='Success'),
}

model GetInventoryResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetInventoryResponseBody(name='body'),
}

async function getInventoryWithOptions(request: GetInventoryRequest, runtime: Util.RuntimeOptions): GetInventoryResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.commodityCode)) {
    body['CommodityCode'] = request.commodityCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetInventory',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getInventory(request: GetInventoryRequest): GetInventoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return getInventoryWithOptions(request, runtime);
}

model GetMonitorListRequest {
  corpId?: string(name='CorpId', example='10001'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model GetMonitorListResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    records?: [ 
      {
        algorithmVendor?: string(name='AlgorithmVendor', example='damo'),
        attributes?: string(name='Attributes', example='corpId in ["2866505729643122435"]'),
        createDate?: string(name='CreateDate', example='2020-09-10 21:25:25'),
        description?: string(name='Description'),
        deviceList?: string(name='DeviceList', example='33011012011327990001,33011012011327990002'),
        expression?: string(name='Expression', example='corpId in ["2866505729643122435"]'),
        imageMatch?: string(name='ImageMatch', example='1'),
        modifiedDate?: string(name='ModifiedDate', example='2020-09-10 21:25:25'),
        monitorType?: string(name='MonitorType', example='face'),
        notifierExtendValues?: string(name='NotifierExtendValues', example='{\\"userId\\": \\"1\\" }'),
        notifierType?: string(name='NotifierType', example='webhook'),
        ruleExpression?: string(name='RuleExpression', example='PlateReliability > 84'),
        ruleName?: string(name='RuleName', example='un_mask_match'),
        status?: string(name='Status', example='RUNNING'),
        taskId?: string(name='TaskId', example='300f7e67c82e42b48a197894f514d69b'),
      }
    ](name='Records'),
    totalCount?: int32(name='TotalCount', example='10'),
    totalPage?: int32(name='TotalPage', example='1'),
  }(name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='ff519c35_e070_4da3_a3d0_cfe5c9b4eb74'),
}

model GetMonitorListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetMonitorListResponseBody(name='body'),
}

async function getMonitorListWithOptions(request: GetMonitorListRequest, runtime: Util.RuntimeOptions): GetMonitorListResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetMonitorList',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getMonitorList(request: GetMonitorListRequest): GetMonitorListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getMonitorListWithOptions(request, runtime);
}

model GetMonitorResultRequest {
  algorithmVendor?: string(name='AlgorithmVendor', example='damo'),
  corpId?: string(name='CorpId', example='10001'),
  endTime?: long(name='EndTime', example='1590409851000'),
  minRecordId?: string(name='MinRecordId', example='1'),
  startTime?: long(name='StartTime', example='1590409851000'),
  taskId?: string(name='TaskId', example='d5b65bb43c5242d89b199a360211930c'),
}

model GetMonitorResultResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    maxId?: string(name='MaxId', example='10'),
    records?: [ 
      {
        extendInfo?: {
          plateNo?: string(name='PlateNo'),
        }(name='ExtendInfo'),
        gbId?: string(name='GbId', example='3301101201132799****'),
        leftUpX?: string(name='LeftUpX', example='100'),
        leftUpY?: string(name='LeftUpY', example='100'),
        monitorPicUrl?: string(name='MonitorPicUrl', example='http://xxx/xxx.jpg'),
        picUrl?: string(name='PicUrl', example='http://xxx/xxx.jpg'),
        rightBottomX?: string(name='RightBottomX', example='800'),
        rightBottomY?: string(name='RightBottomY', example='800'),
        score?: string(name='Score', example='0.8'),
        shotTime?: string(name='ShotTime', example='1590411602000'),
        targetPicUrl?: string(name='TargetPicUrl', example='http://xxx'),
        taskId?: string(name='TaskId'),
      }
    ](name='Records'),
  }(name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='313f1f30_600e_482e_9fcc_1ef3e738c1a3'),
}

model GetMonitorResultResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetMonitorResultResponseBody(name='body'),
}

async function getMonitorResultWithOptions(request: GetMonitorResultRequest, runtime: Util.RuntimeOptions): GetMonitorResultResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmVendor)) {
    body['AlgorithmVendor'] = request.algorithmVendor;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.minRecordId)) {
    body['MinRecordId'] = request.minRecordId;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.taskId)) {
    body['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetMonitorResult',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getMonitorResult(request: GetMonitorResultRequest): GetMonitorResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return getMonitorResultWithOptions(request, runtime);
}

model GetOdpsResultResponseBody = {
  data?: string(name='Data'),
  success?: boolean(name='Success'),
}

model GetOdpsResultResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetOdpsResultResponseBody(name='body'),
}

async function getOdpsResultWithOptions(runtime: Util.RuntimeOptions): GetOdpsResultResponse {
  var req = new OpenApi.OpenApiRequest{};
  var params = new OpenApi.Params{
    action = 'GetOdpsResult',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getOdpsResult(): GetOdpsResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return getOdpsResultWithOptions(runtime);
}

model GetPersonDetailRequest {
  algorithmType?: string(name='AlgorithmType'),
  corpId?: string(name='CorpId'),
  personID?: string(name='PersonID'),
}

model GetPersonDetailResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    personId?: string(name='PersonId'),
    picUrl?: string(name='PicUrl'),
    tagList?: [ 
      {
        tagCode?: string(name='TagCode'),
        tagName?: string(name='TagName'),
        tagValue?: string(name='TagValue'),
        tagValueId?: string(name='TagValueId'),
      }
    ](name='TagList'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='XXXX'),
}

model GetPersonDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetPersonDetailResponseBody(name='body'),
}

async function getPersonDetailWithOptions(request: GetPersonDetailRequest, runtime: Util.RuntimeOptions): GetPersonDetailResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmType)) {
    body['AlgorithmType'] = request.algorithmType;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.personID)) {
    body['PersonID'] = request.personID;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetPersonDetail',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getPersonDetail(request: GetPersonDetailRequest): GetPersonDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPersonDetailWithOptions(request, runtime);
}

model GetPersonListRequest {
  corpId?: string(name='CorpId'),
  corpIdList?: map[string]any(name='CorpIdList', example='["corpId1","corpId2"]'),
  faceMatchingRateThreshold?: string(name='FaceMatchingRateThreshold'),
  faceUrl?: string(name='FaceUrl'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='1000'),
  personIdList?: map[string]any(name='PersonIdList', example='["personId1"]'),
}

model GetPersonListShrinkRequest {
  corpId?: string(name='CorpId'),
  corpIdListShrink?: string(name='CorpIdList', example='["corpId1","corpId2"]'),
  faceMatchingRateThreshold?: string(name='FaceMatchingRateThreshold'),
  faceUrl?: string(name='FaceUrl'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='1000'),
  personIdListShrink?: string(name='PersonIdList', example='["personId1"]'),
}

model GetPersonListResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    pageNumber?: long(name='PageNumber', example='1'),
    pageSize?: long(name='PageSize', example='100'),
    records?: [ 
      {
        faceUrl?: string(name='FaceUrl'),
        firstShotTime?: long(name='FirstShotTime', example='1602571402'),
        lastShotTime?: long(name='LastShotTime', example='1602571402'),
        personId?: string(name='PersonId', example='PersonId-example'),
        propertyTagList?: [ 
          {
            code?: string(name='Code'),
            tagCodeName?: string(name='TagCodeName'),
            tagName?: string(name='TagName'),
            value?: string(name='Value'),
          }
        ](name='PropertyTagList'),
        searchMatchingRate?: string(name='SearchMatchingRate', example='0.8'),
      }
    ](name='Records'),
    totalCount?: long(name='TotalCount', example='1000'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='XXXX-XXX-XXXX'),
}

model GetPersonListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetPersonListResponseBody(name='body'),
}

async function getPersonListWithOptions(tmpReq: GetPersonListRequest, runtime: Util.RuntimeOptions): GetPersonListResponse {
  Util.validateModel(tmpReq);
  var request = new GetPersonListShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.corpIdList)) {
    request.corpIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.corpIdList, 'CorpIdList', 'json');
  }
  if (!Util.isUnset(tmpReq.personIdList)) {
    request.personIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.personIdList, 'PersonIdList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.corpIdListShrink)) {
    body['CorpIdList'] = request.corpIdListShrink;
  }
  if (!Util.isUnset(request.faceMatchingRateThreshold)) {
    body['FaceMatchingRateThreshold'] = request.faceMatchingRateThreshold;
  }
  if (!Util.isUnset(request.faceUrl)) {
    body['FaceUrl'] = request.faceUrl;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.personIdListShrink)) {
    body['PersonIdList'] = request.personIdListShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetPersonList',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getPersonList(request: GetPersonListRequest): GetPersonListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPersonListWithOptions(request, runtime);
}

model GetPictureUrlRequest {
  expireTime?: string(name='ExpireTime'),
  originUrl?: string(name='OriginUrl'),
  protocol?: string(name='Protocol'),
}

model GetPictureUrlResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  url?: string(name='Url'),
}

model GetPictureUrlResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetPictureUrlResponseBody(name='body'),
}

async function getPictureUrlWithOptions(request: GetPictureUrlRequest, runtime: Util.RuntimeOptions): GetPictureUrlResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.expireTime)) {
    body['ExpireTime'] = request.expireTime;
  }
  if (!Util.isUnset(request.originUrl)) {
    body['OriginUrl'] = request.originUrl;
  }
  if (!Util.isUnset(request.protocol)) {
    body['Protocol'] = request.protocol;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetPictureUrl',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getPictureUrl(request: GetPictureUrlRequest): GetPictureUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getPictureUrlWithOptions(request, runtime);
}

model GetProfileDetailRequest {
  corpId?: string(name='CorpId'),
  isvSubId?: string(name='IsvSubId'),
  profileId?: long(name='ProfileId', example='1'),
}

model GetProfileDetailResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    bizId?: string(name='BizId', example='1'),
    catalogId?: int32(name='CatalogId', example='1'),
    faceUrl?: string(name='FaceUrl'),
    gender?: string(name='Gender', example='1'),
    idNumber?: string(name='IdNumber'),
    isvSubId?: string(name='IsvSubId'),
    liveAddress?: string(name='LiveAddress'),
    name?: string(name='Name'),
    personId?: string(name='PersonId'),
    phoneNo?: string(name='PhoneNo'),
    plateNo?: string(name='PlateNo'),
    profileId?: int32(name='ProfileId', example='1'),
    sceneType?: string(name='SceneType'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='XXXX-XXX-XXXX'),
}

model GetProfileDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetProfileDetailResponseBody(name='body'),
}

async function getProfileDetailWithOptions(request: GetProfileDetailRequest, runtime: Util.RuntimeOptions): GetProfileDetailResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.profileId)) {
    body['ProfileId'] = request.profileId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetProfileDetail',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getProfileDetail(request: GetProfileDetailRequest): GetProfileDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return getProfileDetailWithOptions(request, runtime);
}

model GetProfileListRequest {
  bizId?: string(name='BizId', example='1'),
  catalogId?: long(name='CatalogId', example='1'),
  corpId?: string(name='CorpId'),
  faceImageId?: string(name='FaceImageId', example='http://xxxx:ssss/a.jpg'),
  faceUrl?: string(name='FaceUrl'),
  gender?: int32(name='Gender', example='1'),
  idNumber?: string(name='IdNumber'),
  isvSubId?: string(name='IsvSubId'),
  liveAddress?: string(name='LiveAddress'),
  matchingRateThreshold?: string(name='MatchingRateThreshold', example='0.8'),
  name?: string(name='Name'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  personIdList?: map[string]any(name='PersonIdList', example='["a1"]'),
  phoneNo?: string(name='PhoneNo'),
  plateNo?: string(name='PlateNo'),
  profileIdList?: map[string]any(name='ProfileIdList', example='[1,2,3]'),
  sceneType?: string(name='SceneType'),
}

model GetProfileListShrinkRequest {
  bizId?: string(name='BizId', example='1'),
  catalogId?: long(name='CatalogId', example='1'),
  corpId?: string(name='CorpId'),
  faceImageId?: string(name='FaceImageId', example='http://xxxx:ssss/a.jpg'),
  faceUrl?: string(name='FaceUrl'),
  gender?: int32(name='Gender', example='1'),
  idNumber?: string(name='IdNumber'),
  isvSubId?: string(name='IsvSubId'),
  liveAddress?: string(name='LiveAddress'),
  matchingRateThreshold?: string(name='MatchingRateThreshold', example='0.8'),
  name?: string(name='Name'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  personIdListShrink?: string(name='PersonIdList', example='["a1"]'),
  phoneNo?: string(name='PhoneNo'),
  plateNo?: string(name='PlateNo'),
  profileIdListShrink?: string(name='ProfileIdList', example='[1,2,3]'),
  sceneType?: string(name='SceneType'),
}

model GetProfileListResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    pageNumber?: long(name='PageNumber', example='1'),
    pageSize?: long(name='PageSize', example='20'),
    records?: [ 
      {
        bizId?: string(name='BizId', example='1'),
        catalogId?: int32(name='CatalogId', example='1'),
        faceUrl?: string(name='FaceUrl'),
        gender?: string(name='Gender', example='1'),
        idNumber?: string(name='IdNumber'),
        isvSubId?: string(name='IsvSubId'),
        name?: string(name='Name'),
        personId?: string(name='PersonId', example='1'),
        profileId?: int32(name='ProfileId', example='1'),
        sceneType?: string(name='SceneType'),
        searchMatchingRate?: string(name='SearchMatchingRate', example='0.8'),
      }
    ](name='Records'),
    success?: boolean(name='Success', example='true'),
    total?: long(name='Total', example='100'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='XXXX-XXX-XXXX'),
}

model GetProfileListResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetProfileListResponseBody(name='body'),
}

async function getProfileListWithOptions(tmpReq: GetProfileListRequest, runtime: Util.RuntimeOptions): GetProfileListResponse {
  Util.validateModel(tmpReq);
  var request = new GetProfileListShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.personIdList)) {
    request.personIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.personIdList, 'PersonIdList', 'json');
  }
  if (!Util.isUnset(tmpReq.profileIdList)) {
    request.profileIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.profileIdList, 'ProfileIdList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.catalogId)) {
    body['CatalogId'] = request.catalogId;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.faceImageId)) {
    body['FaceImageId'] = request.faceImageId;
  }
  if (!Util.isUnset(request.faceUrl)) {
    body['FaceUrl'] = request.faceUrl;
  }
  if (!Util.isUnset(request.gender)) {
    body['Gender'] = request.gender;
  }
  if (!Util.isUnset(request.idNumber)) {
    body['IdNumber'] = request.idNumber;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.liveAddress)) {
    body['LiveAddress'] = request.liveAddress;
  }
  if (!Util.isUnset(request.matchingRateThreshold)) {
    body['MatchingRateThreshold'] = request.matchingRateThreshold;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.personIdListShrink)) {
    body['PersonIdList'] = request.personIdListShrink;
  }
  if (!Util.isUnset(request.phoneNo)) {
    body['PhoneNo'] = request.phoneNo;
  }
  if (!Util.isUnset(request.plateNo)) {
    body['PlateNo'] = request.plateNo;
  }
  if (!Util.isUnset(request.profileIdListShrink)) {
    body['ProfileIdList'] = request.profileIdListShrink;
  }
  if (!Util.isUnset(request.sceneType)) {
    body['SceneType'] = request.sceneType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetProfileList',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getProfileList(request: GetProfileListRequest): GetProfileListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getProfileListWithOptions(request, runtime);
}

model GetScanSubDevicesRequest {
  corpId?: string(name='CorpId', example='2685841953580387840'),
  deviceId?: string(name='DeviceId', example='1101050001132700****'),
}

model GetScanSubDevicesResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    subDeviceList?: [ 
      {
        associatedNvr?: string(name='AssociatedNvr', example='1'),
        deviceMac?: string(name='DeviceMac', example='xxx'),
        deviceModel?: string(name='DeviceModel', example='IPC2A5I-IR6-AUPF40-B-DT'),
        deviceSn?: string(name='DeviceSn', example='210235C4QD3217003317'),
        firmwareVersion?: string(name='FirmwareVersion', example='IPC_G6202-B0001P97D1911_Ali0805'),
        manufacturer?: string(name='Manufacturer', example='UNIVIEW'),
        subDeviceIp?: string(name='SubDeviceIp', example='192.168.0.123'),
        subDevicePort?: string(name='SubDevicePort', example='1234'),
      }
    ](name='SubDeviceList'),
  }(name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model GetScanSubDevicesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetScanSubDevicesResponseBody(name='body'),
}

async function getScanSubDevicesWithOptions(request: GetScanSubDevicesRequest, runtime: Util.RuntimeOptions): GetScanSubDevicesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetScanSubDevices',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getScanSubDevices(request: GetScanSubDevicesRequest): GetScanSubDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return getScanSubDevicesWithOptions(request, runtime);
}

model GetUserDetailRequest {
  corpId?: string(name='CorpId'),
  isvSubId?: string(name='IsvSubId'),
  needFaceDetail?: boolean(name='NeedFaceDetail'),
  userId?: long(name='UserId'),
}

model GetUserDetailResponseBody = {
  code?: string(name='Code'),
  data?: {
    address?: string(name='Address'),
    age?: string(name='Age'),
    attachment?: string(name='Attachment'),
    bizId?: string(name='BizId'),
    faceImageUrl?: string(name='FaceImageUrl'),
    gender?: string(name='Gender'),
    idNumber?: string(name='IdNumber'),
    isvSubId?: string(name='IsvSubId'),
    phoneNo?: string(name='PhoneNo'),
    plateNo?: string(name='PlateNo'),
    userGroupId?: int32(name='UserGroupId'),
    userId?: int32(name='UserId'),
    userName?: string(name='UserName'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetUserDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetUserDetailResponseBody(name='body'),
}

async function getUserDetailWithOptions(request: GetUserDetailRequest, runtime: Util.RuntimeOptions): GetUserDetailResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.needFaceDetail)) {
    body['NeedFaceDetail'] = request.needFaceDetail;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetUserDetail',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getUserDetail(request: GetUserDetailRequest): GetUserDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUserDetailWithOptions(request, runtime);
}

model GetVideoComposeResultRequest {
  corpId?: string(name='CorpId', example='test'),
  taskRequestId?: string(name='TaskRequestId', example='4ea08acd9baccf37403d4fbe24591e7b'),
}

model GetVideoComposeResultResponseBody = {
  code?: string(name='Code', example='success'),
  message?: string(name='Message', example='""'),
  requestId?: string(name='RequestId', example='4ea08acd9baccf37403d4fbe24591e7b'),
  status?: string(name='Status', example='100%-complete'),
  videoUrl?: string(name='VideoUrl', example='data/kaijian/4ea08acd9baccf37403d4fbe24591e7b.mp'),
}

model GetVideoComposeResultResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetVideoComposeResultResponseBody(name='body'),
}

async function getVideoComposeResultWithOptions(request: GetVideoComposeResultRequest, runtime: Util.RuntimeOptions): GetVideoComposeResultResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.taskRequestId)) {
    body['TaskRequestId'] = request.taskRequestId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetVideoComposeResult',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getVideoComposeResult(request: GetVideoComposeResultRequest): GetVideoComposeResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return getVideoComposeResultWithOptions(request, runtime);
}

model GetVideoSummaryTaskResultRequest {
  corpId?: string(name='CorpId'),
  taskId?: string(name='TaskId'),
}

model GetVideoSummaryTaskResultResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model GetVideoSummaryTaskResultResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetVideoSummaryTaskResultResponseBody(name='body'),
}

async function getVideoSummaryTaskResultWithOptions(request: GetVideoSummaryTaskResultRequest, runtime: Util.RuntimeOptions): GetVideoSummaryTaskResultResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.taskId)) {
    body['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetVideoSummaryTaskResult',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getVideoSummaryTaskResult(request: GetVideoSummaryTaskResultRequest): GetVideoSummaryTaskResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return getVideoSummaryTaskResultWithOptions(request, runtime);
}

model InvokeMotorModelRequest {
  corpId?: string(name='CorpId'),
  picId?: string(name='PicId'),
  picPath?: string(name='PicPath'),
  picUrl?: string(name='PicUrl'),
}

model InvokeMotorModelResponseBody = {
  code?: string(name='Code'),
  data?: {
    structList?: string(name='StructList'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model InvokeMotorModelResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: InvokeMotorModelResponseBody(name='body'),
}

async function invokeMotorModelWithOptions(request: InvokeMotorModelRequest, runtime: Util.RuntimeOptions): InvokeMotorModelResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.picId)) {
    body['PicId'] = request.picId;
  }
  if (!Util.isUnset(request.picPath)) {
    body['PicPath'] = request.picPath;
  }
  if (!Util.isUnset(request.picUrl)) {
    body['PicUrl'] = request.picUrl;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'InvokeMotorModel',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function invokeMotorModel(request: InvokeMotorModelRequest): InvokeMotorModelResponse {
  var runtime = new Util.RuntimeOptions{};
  return invokeMotorModelWithOptions(request, runtime);
}

model ListAccessNumberRequest {
  corpIdList?: string(name='CorpIdList', example='3782059163366984070'),
}

model ListAccessNumberResponseBody = {
  code?: string(name='Code', example='200'),
  data?: [ 
    {
      count?: string(name='Count', example='10'),
      item?: string(name='Item', example='totalQuota'),
      percent?: string(name='Percent', example='0.0'),
    }
  ](name='Data'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='F810ADE9-DE0D-5C4A-B1D8-14EA969C7A3C'),
}

model ListAccessNumberResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListAccessNumberResponseBody(name='body'),
}

async function listAccessNumberWithOptions(request: ListAccessNumberRequest, runtime: Util.RuntimeOptions): ListAccessNumberResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpIdList)) {
    body['CorpIdList'] = request.corpIdList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListAccessNumber',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listAccessNumber(request: ListAccessNumberRequest): ListAccessNumberResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAccessNumberWithOptions(request, runtime);
}

model ListAlgorithmNamesByDeviceIdsRequest {
  gbIds?: string(name='GbIds', example='1101050001132700****,1101050001132701****'),
}

model ListAlgorithmNamesByDeviceIdsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: [ 
    {
      algorithmNames?: [ string ](name='AlgorithmNames'),
      gbId?: string(name='GbId', example='1101050001132700****'),
    }
  ](name='Data'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
}

model ListAlgorithmNamesByDeviceIdsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListAlgorithmNamesByDeviceIdsResponseBody(name='body'),
}

async function listAlgorithmNamesByDeviceIdsWithOptions(request: ListAlgorithmNamesByDeviceIdsRequest, runtime: Util.RuntimeOptions): ListAlgorithmNamesByDeviceIdsResponse {
  Util.validateModel(request);
  var query = OpenApiUtil.query(Util.toMap(request));
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAlgorithmNamesByDeviceIds',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listAlgorithmNamesByDeviceIds(request: ListAlgorithmNamesByDeviceIdsRequest): ListAlgorithmNamesByDeviceIdsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAlgorithmNamesByDeviceIdsWithOptions(request, runtime);
}

model ListBodyAlgorithmResultsRequest {
  algorithmType?: string(name='AlgorithmType', example='damo'),
  capStyle?: string(name='CapStyle', example='11'),
  corpId?: string(name='CorpId', example='2520603458709488128'),
  dataSourceId?: string(name='DataSourceId', example='33011012011327999991'),
  endTime?: string(name='EndTime', example='2020-06-02 00:00:00'),
  pageNumber?: string(name='PageNumber', example='1'),
  pageSize?: string(name='PageSize', example='10'),
  startTime?: string(name='StartTime', example='2020-06-01 00:00:00'),
}

model ListBodyAlgorithmResultsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    records?: [ 
      {
        capStyle?: string(name='CapStyle', example='11'),
        coatColor?: string(name='CoatColor', example='2'),
        coatLength?: string(name='CoatLength', example='2'),
        coatStyle?: string(name='CoatStyle', example='3'),
        corpId?: string(name='CorpId', example='2520603458709488128'),
        dataSourceId?: string(name='DataSourceId', example='33011012011327999991'),
        genderCode?: string(name='GenderCode', example='1'),
        hairStyle?: string(name='HairStyle', example='3'),
        leftTopX?: float(name='LeftTopX', example='381'),
        leftTopY?: float(name='LeftTopY', example='1100'),
        maxAge?: string(name='MaxAge', example='40'),
        minAge?: string(name='MinAge', example='20'),
        personId?: string(name='PersonId', example='330106120113270010010220200915064814540550154055'),
        picUrlPath?: string(name='PicUrlPath', example='vcs-20200915-20200916-poc-test-1/270/damo/combined_pic/1/1600123694245000/8b8d611bb9ec461fa75b4695573505c9.jpg?begin=0&end=966&instance=poc-test-1®ion=huadong1-center'),
        rightBottomX?: float(name='RightBottomX', example='343'),
        rightBottomY?: float(name='RightBottomY', example='603'),
        shotTime?: string(name='ShotTime', example='2020-09-14T22:48:14.245+0000'),
        sourceId?: string(name='SourceId', example='33010612011327001001022020091506481454055'),
        targetPicUrlPath?: string(name='TargetPicUrlPath', example='vcs-20200915-20200916-poc-test-1/270/damo/combined_pic/1/1600123694245000/8b8d611bb9ec461fa75b46953505c9.jpg?begin=0&end=96446&instance=poc-test-1®ion=huadong1-center'),
        trousersColor?: string(name='TrousersColor', example='1'),
        trousersLength?: string(name='TrousersLength', example='1'),
        trousersStyle?: string(name='TrousersStyle', example='1'),
      }
    ](name='Records'),
    totalCount?: int32(name='TotalCount', example='10'),
    totalPage?: int32(name='TotalPage', example='100'),
  }(name='Data'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='cce2a382_c4a6_416e_ad00_4545f6dc648c'),
}

model ListBodyAlgorithmResultsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListBodyAlgorithmResultsResponseBody(name='body'),
}

async function listBodyAlgorithmResultsWithOptions(request: ListBodyAlgorithmResultsRequest, runtime: Util.RuntimeOptions): ListBodyAlgorithmResultsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmType)) {
    body['AlgorithmType'] = request.algorithmType;
  }
  if (!Util.isUnset(request.capStyle)) {
    body['CapStyle'] = request.capStyle;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.dataSourceId)) {
    body['DataSourceId'] = request.dataSourceId;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListBodyAlgorithmResults',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listBodyAlgorithmResults(request: ListBodyAlgorithmResultsRequest): ListBodyAlgorithmResultsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listBodyAlgorithmResultsWithOptions(request, runtime);
}

model ListCorpGroupMetricsRequest {
  corpId?: string(name='CorpId', example='2611319643905724169'),
  deviceGroup?: string(name='DeviceGroup', example='33011012011327999991'),
  deviceId?: string(name='DeviceId', example='33011012011327999991'),
  endTime?: string(name='EndTime', example='2020-08-27 00:00:00'),
  groupId?: string(name='GroupId', example='11223344'),
  pageNumber?: string(name='PageNumber', example='1'),
  pageSize?: string(name='PageSize', example='10'),
  startTime?: string(name='StartTime', example='2020-07-01 00:00:00'),
  tagCode?: string(name='TagCode', example='tag_corpgroup_day_personnumber'),
  userGroup?: string(name='UserGroup', example='1122'),
}

model ListCorpGroupMetricsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: [ 
    {
      corpGroupId?: string(name='CorpGroupId', example='-1'),
      corpId?: string(name='CorpId', example='2611319643905724169'),
      dateId?: string(name='DateId', example='2020-08-13'),
      deviceGroupId?: string(name='DeviceGroupId', example='-1'),
      deviceId?: string(name='DeviceId', example='-1'),
      personID?: string(name='PersonID', example='rvsvisual_10180_33010512011327002002_0001597281162962000000000'),
      tagCode?: string(name='TagCode', example='tag_corpgroup_day_personvisits'),
      tagMetrics?: string(name='TagMetrics', example='2'),
      tagValue?: string(name='TagValue', example='-1'),
      userGroupId?: string(name='UserGroupId', example='-1'),
    }
  ](name='Data'),
  message?: string(name='Message', example='Success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='c8ee2215-9e34-4a48-a691-05c98e9373a6'),
  success?: string(name='Success', example='success'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListCorpGroupMetricsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListCorpGroupMetricsResponseBody(name='body'),
}

async function listCorpGroupMetricsWithOptions(request: ListCorpGroupMetricsRequest, runtime: Util.RuntimeOptions): ListCorpGroupMetricsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.deviceGroup)) {
    body['DeviceGroup'] = request.deviceGroup;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.tagCode)) {
    body['TagCode'] = request.tagCode;
  }
  if (!Util.isUnset(request.userGroup)) {
    body['UserGroup'] = request.userGroup;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListCorpGroupMetrics',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listCorpGroupMetrics(request: ListCorpGroupMetricsRequest): ListCorpGroupMetricsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listCorpGroupMetricsWithOptions(request, runtime);
}

model ListCorpGroupsRequest {
  corpId?: string(name='CorpId'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
}

model ListCorpGroupsResponseBody = {
  code?: string(name='Code'),
  data?: {
    pageNumber?: long(name='PageNumber'),
    pageSize?: long(name='PageSize'),
    records?: [ string ](name='Records'),
    totalCount?: long(name='TotalCount'),
    totalPage?: long(name='TotalPage'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ListCorpGroupsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListCorpGroupsResponseBody(name='body'),
}

async function listCorpGroupsWithOptions(request: ListCorpGroupsRequest, runtime: Util.RuntimeOptions): ListCorpGroupsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListCorpGroups',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listCorpGroups(request: ListCorpGroupsRequest): ListCorpGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listCorpGroupsWithOptions(request, runtime);
}

model ListCorpMetricsRequest {
  corpId?: string(name='CorpId', example='2611319643905724169'),
  deviceGroupList?: string(name='DeviceGroupList', example='33011012011327999991'),
  deviceIdList?: string(name='DeviceIdList', example='33011012011327999991'),
  endTime?: string(name='EndTime', example='2020-08-11 00:00:00'),
  pageNumber?: string(name='PageNumber', example='1'),
  pageSize?: string(name='PageSize', example='10'),
  startTime?: string(name='StartTime', example='2020-08-10 00:00:00'),
  tagCode?: string(name='TagCode', example='tag_corp_day_personnumber'),
  userGroupList?: string(name='UserGroupList', example='1122'),
}

model ListCorpMetricsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: [ 
    {
      corpId?: string(name='CorpId', example='2611319643905724169'),
      dateId?: string(name='DateId', example='2020-08-10'),
      deviceGroupId?: string(name='DeviceGroupId', example='-1'),
      deviceId?: string(name='DeviceId', example='-1'),
      personId?: string(name='PersonId', example='-1'),
      tagCode?: string(name='TagCode', example='tag_corp_day_personnumber'),
      tagMetrics?: string(name='TagMetrics', example='28'),
      tagValue?: string(name='TagValue', example='-1'),
      userGroupId?: string(name='UserGroupId', example='-1'),
    }
  ](name='Data'),
  message?: string(name='Message', example='Success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='0a3c22cd-e329-431b-ba81-dce1379be498'),
  success?: string(name='Success', example='success'),
  totalCount?: int32(name='TotalCount', example='100'),
}

model ListCorpMetricsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListCorpMetricsResponseBody(name='body'),
}

async function listCorpMetricsWithOptions(request: ListCorpMetricsRequest, runtime: Util.RuntimeOptions): ListCorpMetricsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.deviceGroupList)) {
    body['DeviceGroupList'] = request.deviceGroupList;
  }
  if (!Util.isUnset(request.deviceIdList)) {
    body['DeviceIdList'] = request.deviceIdList;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.tagCode)) {
    body['TagCode'] = request.tagCode;
  }
  if (!Util.isUnset(request.userGroupList)) {
    body['UserGroupList'] = request.userGroupList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListCorpMetrics',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listCorpMetrics(request: ListCorpMetricsRequest): ListCorpMetricsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listCorpMetricsWithOptions(request, runtime);
}

model ListCorpsRequest {
  corpName?: string(name='CorpName', example='example'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model ListCorpsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    records?: [ 
      {
        acuUsed?: int32(name='AcuUsed', example='2'),
        appName?: string(name='AppName', example='example'),
        corpId?: string(name='CorpId', example='100001****'),
        corpName?: string(name='CorpName', example='example'),
        createDate?: string(name='CreateDate', example='2021-09-01'),
        description?: string(name='Description', example='example'),
        deviceCount?: int32(name='DeviceCount', example='10'),
        iconPath?: string(name='IconPath', example='http://xxx/example.jpg'),
        isvSubId?: string(name='IsvSubId', example='127205505548****'),
        parentCorpId?: string(name='ParentCorpId', example='100001****'),
        YOfflineAcuUsed?: double(name='YOfflineAcuUsed', example='10'),
      }
    ](name='Records'),
    totalCount?: int32(name='TotalCount', example='1'),
    totalPage?: int32(name='TotalPage', example='1'),
  }(name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
}

model ListCorpsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListCorpsResponseBody(name='body'),
}

async function listCorpsWithOptions(request: ListCorpsRequest, runtime: Util.RuntimeOptions): ListCorpsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpName)) {
    body['CorpName'] = request.corpName;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListCorps',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listCorps(request: ListCorpsRequest): ListCorpsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listCorpsWithOptions(request, runtime);
}

model ListDeviceGroupsRequest {
  corpIdList?: string(name='CorpIdList', example='4031445114646694277'),
  dataSourceType?: string(name='DataSourceType', example='VIDEO'),
  deviceCodeList?: string(name='DeviceCodeList', example='34020000010172204207,50010324001310024813'),
  group?: string(name='Group'),
  isPage?: int32(name='IsPage', example='1'),
  name?: string(name='Name'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model ListDeviceGroupsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: [ 
    {
      list?: [ 
        {
          bitRate?: string(name='BitRate', example='10M'),
          codingFormat?: string(name='CodingFormat', example='6'),
          dataSourceType?: string(name='DataSourceType', example='VIDEO'),
          deviceCode?: string(name='DeviceCode', example='31000000991327000175'),
          deviceComputeStatus?: string(name='DeviceComputeStatus', example='1'),
          deviceGroup?: string(name='DeviceGroup'),
          deviceName?: string(name='DeviceName'),
          deviceSn?: string(name='DeviceSn', example='210235C4QD3217003163'),
          deviceStatus?: string(name='DeviceStatus', example='1'),
          deviceStreamStatus?: string(name='DeviceStreamStatus', example='1'),
          installAddress?: string(name='InstallAddress'),
          regionId?: string(name='RegionId', example='center'),
          regionName?: string(name='RegionName'),
          resolvingPower?: string(name='ResolvingPower', example='1920*1080'),
          type?: string(name='Type', example='IPC'),
        }
      ](name='List'),
      totalCount?: string(name='TotalCount', example='100'),
    }
  ](name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='FF21F1C1-E73A-5F84-8823-3C8F19BEB081'),
}

model ListDeviceGroupsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListDeviceGroupsResponseBody(name='body'),
}

async function listDeviceGroupsWithOptions(request: ListDeviceGroupsRequest, runtime: Util.RuntimeOptions): ListDeviceGroupsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpIdList)) {
    body['CorpIdList'] = request.corpIdList;
  }
  if (!Util.isUnset(request.dataSourceType)) {
    body['DataSourceType'] = request.dataSourceType;
  }
  if (!Util.isUnset(request.deviceCodeList)) {
    body['DeviceCodeList'] = request.deviceCodeList;
  }
  if (!Util.isUnset(request.group)) {
    body['Group'] = request.group;
  }
  if (!Util.isUnset(request.isPage)) {
    body['IsPage'] = request.isPage;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListDeviceGroups',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listDeviceGroups(request: ListDeviceGroupsRequest): ListDeviceGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDeviceGroupsWithOptions(request, runtime);
}

model ListDevicesRequest {
  corpId?: string(name='CorpId', example='100001'),
  deviceName?: string(name='DeviceName'),
  gbId?: string(name='GbId', example='3301101201132799****'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
}

model ListDevicesResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    records?: [ 
      {
        accessProtocolType?: string(name='AccessProtocolType', example='GB/T28181'),
        bitRate?: string(name='BitRate', example='4M'),
        coverImageUrl?: string(name='CoverImageUrl', example='http://xxxx/storage/getPicture/vcs-20191011-20191012-hz/81b/yushi/combined_pic/motor/1570773801810845/d0ea703859ce4d65819fcca4b8b7780f.jpg'),
        createTime?: string(name='CreateTime', example='2020-05-14'),
        deviceAddress?: string(name='DeviceAddress'),
        deviceDirection?: string(name='DeviceDirection'),
        deviceName?: string(name='DeviceName'),
        deviceSite?: string(name='DeviceSite'),
        deviceType?: string(name='DeviceType', example='IPC'),
        gbId?: string(name='GbId', example='3301101201132799****'),
        latitude?: string(name='Latitude', example='116.397128'),
        longitude?: string(name='Longitude', example='39.916527'),
        resolution?: string(name='Resolution', example='1080P'),
        sipGBId?: string(name='SipGBId', example='3301009901200700****'),
        sipPassword?: string(name='SipPassword', example='123456'),
        sipServerIp?: string(name='SipServerIp', example='116.62.***.****'),
        sipServerPort?: string(name='SipServerPort', example='5060'),
        status?: int32(name='Status', example='1'),
        vendor?: string(name='Vendor'),
      }
    ](name='Records'),
    totalCount?: int32(name='TotalCount', example='10'),
    totalPage?: int32(name='TotalPage', example='1'),
  }(name='Data'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model ListDevicesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListDevicesResponseBody(name='body'),
}

/**
  * ****
  *
  * @param request ListDevicesRequest
  * @param runtime runtime options for this request RuntimeOptions
  * @return ListDevicesResponse
 */
async function listDevicesWithOptions(request: ListDevicesRequest, runtime: Util.RuntimeOptions): ListDevicesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.deviceName)) {
    body['DeviceName'] = request.deviceName;
  }
  if (!Util.isUnset(request.gbId)) {
    body['GbId'] = request.gbId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListDevices',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
  * ****
  *
  * @param request ListDevicesRequest
  * @return ListDevicesResponse
 */
async function listDevices(request: ListDevicesRequest): ListDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDevicesWithOptions(request, runtime);
}

model ListEventAlgorithmDetailsRequest {
  corpId?: string(name='CorpId', example='2685841953580387840'),
  dataSourceId?: string(name='DataSourceId', example='01894808611312154557'),
  endTime?: string(name='EndTime', example='2020-08-31 00:00:00'),
  eventType?: string(name='EventType', example='6202'),
  eventValue?: string(name='EventValue', example='1'),
  extendValue?: string(name='ExtendValue', example='1'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='100'),
  recordId?: string(name='RecordId', example='01894808611312154557022020082106144015561'),
  sourceId?: string(name='SourceId', example='01894808611312154557022020082106144015561'),
  startTime?: string(name='StartTime', example='2020-08-01 00:00:00'),
}

model ListEventAlgorithmDetailsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: [ 
    {
      corpId?: string(name='CorpId', example='2685841953580387840'),
      dataSourceId?: string(name='DataSourceId', example='01894808611312154557'),
      eventType?: string(name='EventType', example='6202'),
      eventValue?: string(name='EventValue'),
      extendValue?: string(name='ExtendValue', example='1'),
      extraExtendValue?: string(name='ExtraExtendValue', example='1'),
      faceCount?: string(name='FaceCount', example='1'),
      leftTopX?: string(name='LeftTopX', example='18'),
      leftTopY?: string(name='LeftTopY', example='47'),
      picUrlPath?: string(name='PicUrlPath', example='vcs-20200829-20200830-poc-test-1/38e/0/1598803169/307c2fc1e32c4434922e1d5d68cf5206.jpg?begin=496042&end=724967&ip=172.20.6.110&g=14®ion=huadong1-center&zz=b7a269ed4d46'),
      pointX?: string(name='PointX', example='18,1214,1230,18'),
      pointY?: string(name='PointY', example='47,23,947,945'),
      recordId?: string(name='RecordId', example='01894808611312154557022020082106144015561'),
      rightBottomX?: string(name='RightBottomX', example='18'),
      rightBottomY?: string(name='RightBottomY', example='47'),
      shotTime?: string(name='ShotTime', example='2020-08-30 23:59:34'),
      sourceId?: string(name='SourceId', example='01894808611312154557022020082106144015561'),
      tagCode?: string(name='TagCode', example='1'),
      tagCodeReliability?: string(name='TagCodeReliability', example='3.32500005'),
      targetPicUrlPath?: string(name='TargetPicUrlPath', example='vcs-20200829-20200830-poc-test-1/38e/0/1598803169/307c2fc1e32c4434922e1d5d68cf5206.jpg?begin=496042&end=724967&ip=172.20.6.110&g=14®ion=huadong1-center&zz=8509b7a269ed4'),
      uuidCode?: string(name='UuidCode', example='11111'),
    }
  ](name='Data'),
  message?: string(name='Message', example='Success'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='100'),
  requestId?: string(name='RequestId', example='ce5b2460-ecc9-4745-a44f-deb9a707a82e'),
  success?: string(name='Success', example='true'),
  totalCount?: int32(name='TotalCount', example='75'),
}

model ListEventAlgorithmDetailsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListEventAlgorithmDetailsResponseBody(name='body'),
}

async function listEventAlgorithmDetailsWithOptions(request: ListEventAlgorithmDetailsRequest, runtime: Util.RuntimeOptions): ListEventAlgorithmDetailsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.dataSourceId)) {
    body['DataSourceId'] = request.dataSourceId;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.eventType)) {
    body['EventType'] = request.eventType;
  }
  if (!Util.isUnset(request.eventValue)) {
    body['EventValue'] = request.eventValue;
  }
  if (!Util.isUnset(request.extendValue)) {
    body['ExtendValue'] = request.extendValue;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.recordId)) {
    body['RecordId'] = request.recordId;
  }
  if (!Util.isUnset(request.sourceId)) {
    body['SourceId'] = request.sourceId;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListEventAlgorithmDetails',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listEventAlgorithmDetails(request: ListEventAlgorithmDetailsRequest): ListEventAlgorithmDetailsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listEventAlgorithmDetailsWithOptions(request, runtime);
}

model ListEventAlgorithmResultsRequest {
  corpId?: string(name='CorpId', example='2520603458709488128'),
  dataSourceId?: string(name='DataSourceId', example='33011012011327999991'),
  endTime?: string(name='EndTime', example='2020-06-02 00:00:00'),
  eventType?: string(name='EventType', example='19'),
  extendValue?: string(name='ExtendValue'),
  pageNumber?: string(name='PageNumber', example='1'),
  pageSize?: string(name='PageSize', example='10'),
  startTime?: string(name='StartTime', example='2020-06-01 00:00:00'),
}

model ListEventAlgorithmResultsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    records?: [ 
      {
        capStyle?: string(name='CapStyle', example='11'),
        corpId?: string(name='CorpId', example='2520603458709488128'),
        dataSourceId?: string(name='DataSourceId', example='33011012011327999991'),
        eventType?: string(name='EventType', example='19'),
        extendValue?: string(name='ExtendValue'),
        extendValueThree?: string(name='ExtendValueThree'),
        extendValueTwo?: string(name='ExtendValueTwo'),
        faceCount?: string(name='FaceCount', example='15'),
        picUrlPath?: string(name='PicUrlPath', example='vcs-20200609-20200610-poc-test-1/b54/damo/combined_pic/0/1591665702856000/xxx.jpg'),
        recordId?: string(name='RecordId'),
        shotTime?: string(name='ShotTime', example='2020-06-04T09:59:31.826+0000'),
        tagCode?: string(name='TagCode'),
        tagCodeReliability?: string(name='TagCodeReliability'),
        targetPicUrlPath?: string(name='TargetPicUrlPath', example='vcs-20200609-20200610-poc-test-1/b54/damo/combined_pic/0/1591665702856000/xxx.jpg'),
        uuidCode?: string(name='UuidCode'),
      }
    ](name='Records'),
    totalCount?: int32(name='TotalCount', example='100'),
    totalPage?: int32(name='TotalPage', example='10'),
  }(name='Data'),
  extendValue?: string(name='ExtendValue'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='cce2a382_c4a6_416e_ad00_4545f6dc648c'),
}

model ListEventAlgorithmResultsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListEventAlgorithmResultsResponseBody(name='body'),
}

async function listEventAlgorithmResultsWithOptions(request: ListEventAlgorithmResultsRequest, runtime: Util.RuntimeOptions): ListEventAlgorithmResultsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.dataSourceId)) {
    body['DataSourceId'] = request.dataSourceId;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.eventType)) {
    body['EventType'] = request.eventType;
  }
  if (!Util.isUnset(request.extendValue)) {
    body['ExtendValue'] = request.extendValue;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListEventAlgorithmResults',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listEventAlgorithmResults(request: ListEventAlgorithmResultsRequest): ListEventAlgorithmResultsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listEventAlgorithmResultsWithOptions(request, runtime);
}

model ListFaceAlgorithmResultsRequest {
  algorithmType?: string(name='AlgorithmType', example='damo'),
  corpId?: string(name='CorpId', example='2520603458709488128'),
  dataSourceId?: string(name='DataSourceId', example='3301101201132799****'),
  endTime?: string(name='EndTime', example='2020-06-02 00:00:00'),
  pageNumber?: string(name='PageNumber', example='1'),
  pageSize?: string(name='PageSize', example='10'),
  startTime?: string(name='StartTime', example='2020-06-01 00:00:00'),
}

model ListFaceAlgorithmResultsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    records?: [ 
      {
        capStyle?: string(name='CapStyle', example='11'),
        corpId?: string(name='CorpId', example='252060345870948****'),
        dataSourceId?: string(name='DataSourceId', example='3301101201132799****'),
        faceId?: string(name='FaceId', example='cce2a382_c4a6_416e_ad00_4545f6dc648c'),
        genderCode?: string(name='GenderCode', example='1'),
        hairStyle?: string(name='HairStyle', example='1'),
        leftTopX?: float(name='LeftTopX', example='22'),
        leftTopY?: float(name='LeftTopY', example='22'),
        maxAge?: string(name='MaxAge', example='40'),
        minAge?: string(name='MinAge', example='21'),
        picUrlPath?: string(name='PicUrlPath', example='vcs-20200609-20200610-poc-test-1/b54/damo/combined_pic/0/1591665702856000/xxx.jpg'),
        rightBottomX?: float(name='RightBottomX', example='525'),
        rightBottomY?: float(name='RightBottomY', example='525'),
        shotTime?: string(name='ShotTime', example='2020-06-04T09:59:31.826+0000'),
        sourceId?: string(name='SourceId', example='cce2a382_c4a6_416e_ad00_4545f6dc648c'),
        targetPicUrlPath?: string(name='TargetPicUrlPath', example='vcs-20200609-20200610-poc-test-1/b54/damo/combined_pic/0/1591665702856000/xxx.jpg'),
      }
    ](name='Records'),
    totalCount?: int32(name='TotalCount', example='100'),
    totalPage?: int32(name='TotalPage', example='10'),
  }(name='Data'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='cce2a382_c4a6_416e_ad00_4545f6dc648c'),
}

model ListFaceAlgorithmResultsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListFaceAlgorithmResultsResponseBody(name='body'),
}

async function listFaceAlgorithmResultsWithOptions(request: ListFaceAlgorithmResultsRequest, runtime: Util.RuntimeOptions): ListFaceAlgorithmResultsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmType)) {
    body['AlgorithmType'] = request.algorithmType;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.dataSourceId)) {
    body['DataSourceId'] = request.dataSourceId;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListFaceAlgorithmResults',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listFaceAlgorithmResults(request: ListFaceAlgorithmResultsRequest): ListFaceAlgorithmResultsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listFaceAlgorithmResultsWithOptions(request, runtime);
}

model ListInstancesRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  instanceName?: string(name='InstanceName'),
  pageSize?: int32(name='PageSize', example='10'),
  projectId?: string(name='ProjectId', example='1'),
}

model ListInstancesResponseBody = {
  code?: string(name='Code', example='0'),
  data?: {
    currentPage?: int32(name='CurrentPage', example='1'),
    items?: [ 
      {
        acuUsed?: int32(name='AcuUsed', example='1'),
        algorithms?: [ 
          {
            algorithmId?: string(name='AlgorithmId', example='10000'),
            algorithmName?: string(name='AlgorithmName'),
          }
        ](name='Algorithms'),
        createTime?: long(name='CreateTime', example='1617878024000'),
        deviceNumber?: int32(name='DeviceNumber', example='10'),
        instanceId?: string(name='InstanceId', example='1111'),
        instanceName?: string(name='InstanceName', example='test'),
        status?: string(name='Status', example='ONLINED'),
      }
    ](name='Items'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='32'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', description='RequestID', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
  success?: boolean(name='Success', example='true'),
}

model ListInstancesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListInstancesResponseBody(name='body'),
}

async function listInstancesWithOptions(request: ListInstancesRequest, runtime: Util.RuntimeOptions): ListInstancesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.currentPage)) {
    query['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.instanceName)) {
    query['InstanceName'] = request.instanceName;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.projectId)) {
    query['ProjectId'] = request.projectId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListInstances',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listInstances(request: ListInstancesRequest): ListInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listInstancesWithOptions(request, runtime);
}

model ListMetricsRequest {
  aggregateType?: string(name='AggregateType', example='day'),
  corpId?: string(name='CorpId', example='2520603458709488128'),
  endTime?: string(name='EndTime', example='2020-06-30 12:30:00'),
  pageNumber?: string(name='PageNumber', example='1'),
  pageSize?: string(name='PageSize', example='10'),
  startTime?: string(name='StartTime', example='2020-06-01 00:00:00'),
  tagCode?: string(name='TagCode', example='tag_age'),
}

model ListMetricsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    records?: [ 
      {
        dateTime?: string(name='DateTime', example='2020-06-01'),
        tagCode?: string(name='TagCode', example='tag_age'),
        tagMetric?: string(name='TagMetric', example='10'),
        tagValue?: string(name='TagValue', example='10-20'),
      }
    ](name='Records'),
    totalCount?: int32(name='TotalCount', example='100'),
    totalPage?: int32(name='TotalPage', example='10'),
  }(name='Data'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='6eb9b73e_3eda_49fc_888d_9f9e440d768e'),
}

model ListMetricsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListMetricsResponseBody(name='body'),
}

async function listMetricsWithOptions(request: ListMetricsRequest, runtime: Util.RuntimeOptions): ListMetricsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.aggregateType)) {
    body['AggregateType'] = request.aggregateType;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.tagCode)) {
    body['TagCode'] = request.tagCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListMetrics',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listMetrics(request: ListMetricsRequest): ListMetricsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listMetricsWithOptions(request, runtime);
}

model ListMotorAlgorithmResultsRequest {
  algorithmType?: string(name='AlgorithmType', example='damo'),
  corpId?: string(name='CorpId', example='2520603458709488128'),
  dataSourceId?: string(name='DataSourceId', example='33011012011327999991'),
  endTime?: string(name='EndTime', example='2020-06-02 00:00:00'),
  pageNumber?: string(name='PageNumber', example='1'),
  pageSize?: string(name='PageSize', example='10'),
  plateNumber?: string(name='PlateNumber'),
  startTime?: string(name='StartTime', example='2020-06-01 00:00:00'),
}

model ListMotorAlgorithmResultsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    records?: [ 
      {
        calling?: string(name='Calling'),
        corpId?: string(name='CorpId', example='2520603458709488128'),
        dataSourceId?: string(name='DataSourceId', example='33011012011327999991'),
        leftTopX?: float(name='LeftTopX', example='100'),
        leftTopY?: float(name='LeftTopY', example='100'),
        motorBrand?: string(name='MotorBrand'),
        motorClass?: string(name='MotorClass'),
        motorColor?: string(name='MotorColor'),
        motorId?: string(name='MotorId', example='210504120113270020090220200609092142595390659539'),
        motorModel?: string(name='MotorModel'),
        motorStyle?: string(name='MotorStyle'),
        picUrlPath?: string(name='PicUrlPath', example='vcs-20200609-20200610-poc-test-1/b54/damo/combined_pic/0/1591665702856000/xxx.jpg'),
        plateClass?: string(name='PlateClass'),
        plateColor?: string(name='PlateColor'),
        plateNumber?: string(name='PlateNumber'),
        rightBottomX?: float(name='RightBottomX', example='900'),
        rightBottomY?: float(name='RightBottomY', example='900'),
        safetyBelt?: string(name='SafetyBelt'),
        shotTime?: string(name='ShotTime', example='2020-06-04T09:59:31.826+0000'),
        sourceId?: string(name='SourceId'),
        targetPicUrlPath?: string(name='TargetPicUrlPath', example='vcs-20200609-20200610-poc-test-1/b54/damo/combined_pic/0/1591665702856000/xxx.jpg'),
      }
    ](name='Records'),
    totalCount?: int32(name='TotalCount', example='100'),
    totalPage?: int32(name='TotalPage', example='10'),
  }(name='Data'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='cce2a382_c4a6_416e_ad00_4545f6dc648c'),
}

model ListMotorAlgorithmResultsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListMotorAlgorithmResultsResponseBody(name='body'),
}

async function listMotorAlgorithmResultsWithOptions(request: ListMotorAlgorithmResultsRequest, runtime: Util.RuntimeOptions): ListMotorAlgorithmResultsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmType)) {
    body['AlgorithmType'] = request.algorithmType;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.dataSourceId)) {
    body['DataSourceId'] = request.dataSourceId;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.plateNumber)) {
    body['PlateNumber'] = request.plateNumber;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListMotorAlgorithmResults',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listMotorAlgorithmResults(request: ListMotorAlgorithmResultsRequest): ListMotorAlgorithmResultsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listMotorAlgorithmResultsWithOptions(request, runtime);
}

model ListNVRChannelDeviceRequest {
  deviceCode?: string(name='DeviceCode', example='33010612011327001001'),
  isPage?: string(name='IsPage', example='1'),
  pageNum?: string(name='PageNum', example='1'),
  pageSize?: string(name='PageSize', example='10'),
}

model ListNVRChannelDeviceResponseBody = {
  data?: [ 
    {
      comptureStatus?: string(name='ComptureStatus', example='1'),
      corpId?: string(name='CorpId', example='2611319643905724169'),
      datasourceType?: string(name='DatasourceType', example='VIDEO'),
      deviceCode?: string(name='DeviceCode', example='13727713218900001'),
      deviceName?: string(name='DeviceName'),
      deviceSn?: string(name='DeviceSn', example='ca0e716429748525'),
      deviceStatus?: string(name='DeviceStatus', example='1'),
      deviceType?: string(name='DeviceType', example='IPC'),
      projectName?: string(name='ProjectName'),
      regionName?: string(name='RegionName'),
      sampleName?: string(name='SampleName'),
      streamStatus?: string(name='StreamStatus', example='1'),
      vap?: string(name='Vap', example='vc'),
    }
  ](name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
  total?: string(name='Total', example='10'),
}

model ListNVRChannelDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListNVRChannelDeviceResponseBody(name='body'),
}

async function listNVRChannelDeviceWithOptions(request: ListNVRChannelDeviceRequest, runtime: Util.RuntimeOptions): ListNVRChannelDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceCode)) {
    body['DeviceCode'] = request.deviceCode;
  }
  if (!Util.isUnset(request.isPage)) {
    body['IsPage'] = request.isPage;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListNVRChannelDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listNVRChannelDevice(request: ListNVRChannelDeviceRequest): ListNVRChannelDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return listNVRChannelDeviceWithOptions(request, runtime);
}

model ListNVRDeviceRequest {
  corpIdList?: string(name='CorpIdList', example='3231532389897340550'),
  deviceCode?: string(name='DeviceCode', example='13727713218900001'),
  isPage?: long(name='IsPage', example='0'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='5'),
}

model ListNVRDeviceResponseBody = {
  data?: [ 
    {
      accessQuota?: string(name='AccessQuota', example='1/2'),
      channel?: string(name='Channel', example='8'),
      comptureStatus?: string(name='ComptureStatus', example='1'),
      corpId?: string(name='CorpId', example='3231532389897340550'),
      datasourceType?: string(name='DatasourceType', example='VIDEO'),
      deviceCode?: string(name='DeviceCode', example='13727713218900001'),
      deviceName?: string(name='DeviceName'),
      deviceSn?: string(name='DeviceSn', example='a2374ea481869ccb'),
      deviceStatus?: string(name='DeviceStatus', example='1'),
      deviceType?: string(name='DeviceType', example='IPC'),
      projectName?: string(name='ProjectName'),
      regionName?: string(name='RegionName'),
      registrationTime?: string(name='RegistrationTime', example='2010-10-11 12:30:11'),
      streamStatus?: string(name='StreamStatus', example='1'),
      type?: string(name='Type', example='IPC'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
  total?: string(name='Total', example='10'),
}

model ListNVRDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListNVRDeviceResponseBody(name='body'),
}

async function listNVRDeviceWithOptions(request: ListNVRDeviceRequest, runtime: Util.RuntimeOptions): ListNVRDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpIdList)) {
    body['CorpIdList'] = request.corpIdList;
  }
  if (!Util.isUnset(request.deviceCode)) {
    body['DeviceCode'] = request.deviceCode;
  }
  if (!Util.isUnset(request.isPage)) {
    body['IsPage'] = request.isPage;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListNVRDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listNVRDevice(request: ListNVRDeviceRequest): ListNVRDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return listNVRDeviceWithOptions(request, runtime);
}

model ListPersonTraceRequest {
  corpId?: string(name='CorpId'),
  dataSourceId?: string(name='DataSourceId'),
  endTime?: string(name='EndTime'),
  groupId?: string(name='GroupId'),
  pageNumber?: string(name='PageNumber'),
  pageSize?: string(name='PageSize'),
  personId?: string(name='PersonId'),
  startTime?: string(name='StartTime'),
}

model ListPersonTraceResponseBody = {
  code?: string(name='Code'),
  data?: [ 
    {
      corpId?: string(name='CorpId'),
      date?: string(name='Date'),
      deviceId?: string(name='DeviceId'),
      endSourceImage?: string(name='EndSourceImage'),
      endTargetImage?: string(name='EndTargetImage'),
      groupId?: string(name='GroupId'),
      lastTime?: string(name='LastTime'),
      personId?: string(name='PersonId'),
      startSourceImage?: string(name='StartSourceImage'),
      startTargetImage?: string(name='StartTargetImage'),
      startTime?: string(name='StartTime'),
    }
  ](name='Data'),
  message?: string(name='Message'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  requestId?: string(name='RequestId'),
  success?: string(name='Success'),
  totalCount?: int32(name='TotalCount'),
}

model ListPersonTraceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListPersonTraceResponseBody(name='body'),
}

async function listPersonTraceWithOptions(request: ListPersonTraceRequest, runtime: Util.RuntimeOptions): ListPersonTraceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.dataSourceId)) {
    body['DataSourceId'] = request.dataSourceId;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.groupId)) {
    body['GroupId'] = request.groupId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.personId)) {
    body['PersonId'] = request.personId;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListPersonTrace',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listPersonTrace(request: ListPersonTraceRequest): ListPersonTraceResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPersonTraceWithOptions(request, runtime);
}

model ListPersonTraceDetailsRequest {
  corpId?: string(name='CorpId'),
  dataSourceId?: string(name='DataSourceId'),
  endTime?: string(name='EndTime'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  personId?: string(name='PersonId'),
  startTime?: string(name='StartTime'),
  subId?: string(name='SubId'),
}

model ListPersonTraceDetailsResponseBody = {
  code?: string(name='Code'),
  data?: [ 
    {
      corpId?: string(name='CorpId'),
      dataSourceId?: string(name='DataSourceId'),
      leftTopX?: string(name='LeftTopX'),
      leftTopY?: string(name='LeftTopY'),
      personId?: string(name='PersonId'),
      picUrlPath?: string(name='PicUrlPath'),
      rightBottomX?: string(name='RightBottomX'),
      rightBottomY?: string(name='RightBottomY'),
      shotTime?: string(name='ShotTime'),
      subId?: string(name='SubId'),
      targetPicUrlPath?: string(name='TargetPicUrlPath'),
    }
  ](name='Data'),
  message?: string(name='Message'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  requestId?: string(name='RequestId'),
  totalCount?: long(name='TotalCount'),
}

model ListPersonTraceDetailsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListPersonTraceDetailsResponseBody(name='body'),
}

async function listPersonTraceDetailsWithOptions(request: ListPersonTraceDetailsRequest, runtime: Util.RuntimeOptions): ListPersonTraceDetailsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.dataSourceId)) {
    body['DataSourceId'] = request.dataSourceId;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.personId)) {
    body['PersonId'] = request.personId;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.subId)) {
    body['SubId'] = request.subId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListPersonTraceDetails',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listPersonTraceDetails(request: ListPersonTraceDetailsRequest): ListPersonTraceDetailsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPersonTraceDetailsWithOptions(request, runtime);
}

model ListPersonVisitCountRequest {
  aggregateType?: string(name='AggregateType'),
  corpId?: string(name='CorpId'),
  countType?: string(name='CountType'),
  endTime?: string(name='EndTime'),
  maxVal?: int32(name='MaxVal'),
  minVal?: int32(name='MinVal'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  startTime?: string(name='StartTime'),
  tagCode?: string(name='TagCode'),
  timeAggregateType?: string(name='TimeAggregateType'),
}

model ListPersonVisitCountResponseBody = {
  code?: string(name='Code'),
  data?: [ 
    {
      corpId?: string(name='CorpId'),
      dayId?: string(name='DayId'),
      deviceId?: string(name='DeviceId'),
      groupId?: string(name='GroupId'),
      hourId?: string(name='HourId'),
      personId?: string(name='PersonId'),
      tagCode?: string(name='TagCode'),
      tagMetrics?: string(name='TagMetrics'),
    }
  ](name='Data'),
  message?: string(name='Message'),
  pageNo?: string(name='PageNo'),
  pageSize?: string(name='PageSize'),
  requestId?: string(name='RequestId'),
  success?: string(name='Success'),
  totalCount?: string(name='TotalCount'),
}

model ListPersonVisitCountResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListPersonVisitCountResponseBody(name='body'),
}

async function listPersonVisitCountWithOptions(request: ListPersonVisitCountRequest, runtime: Util.RuntimeOptions): ListPersonVisitCountResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.aggregateType)) {
    body['AggregateType'] = request.aggregateType;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.countType)) {
    body['CountType'] = request.countType;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.maxVal)) {
    body['MaxVal'] = request.maxVal;
  }
  if (!Util.isUnset(request.minVal)) {
    body['MinVal'] = request.minVal;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.tagCode)) {
    body['TagCode'] = request.tagCode;
  }
  if (!Util.isUnset(request.timeAggregateType)) {
    body['TimeAggregateType'] = request.timeAggregateType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListPersonVisitCount',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listPersonVisitCount(request: ListPersonVisitCountRequest): ListPersonVisitCountResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPersonVisitCountWithOptions(request, runtime);
}

model ListPersonsRequest {
  algorithmType?: string(name='AlgorithmType'),
  corpId?: string(name='CorpId'),
  endTime?: string(name='EndTime'),
  pageNo?: string(name='PageNo'),
  pageSize?: string(name='PageSize'),
  startTime?: string(name='StartTime'),
}

model ListPersonsResponseBody = {
  code?: string(name='Code'),
  data?: {
    pageNo?: string(name='PageNo'),
    pageSize?: string(name='PageSize'),
    records?: [ 
      {
        firstAppearTime?: string(name='FirstAppearTime'),
        personId?: string(name='PersonId'),
        picUrl?: string(name='PicUrl'),
        tagList?: [ 
          {
            tagCode?: string(name='TagCode'),
            tagName?: string(name='TagName'),
            tagValue?: string(name='TagValue'),
            tagValueId?: string(name='TagValueId'),
          }
        ](name='TagList'),
      }
    ](name='Records'),
    totalCount?: string(name='TotalCount'),
    totalPage?: string(name='TotalPage'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ListPersonsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListPersonsResponseBody(name='body'),
}

async function listPersonsWithOptions(request: ListPersonsRequest, runtime: Util.RuntimeOptions): ListPersonsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmType)) {
    body['AlgorithmType'] = request.algorithmType;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.pageNo)) {
    body['PageNo'] = request.pageNo;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListPersons',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listPersons(request: ListPersonsRequest): ListPersonsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listPersonsWithOptions(request, runtime);
}

model ListUserGroupsRequest {
  corpId?: string(name='CorpId'),
  isvSubId?: string(name='IsvSubId'),
}

model ListUserGroupsResponseBody = {
  code?: string(name='Code'),
  data?: [ 
    {
      createTime?: string(name='CreateTime'),
      creator?: string(name='Creator'),
      isvSubId?: string(name='IsvSubId'),
      parentUserGroupId?: long(name='ParentUserGroupId'),
      updateTime?: string(name='UpdateTime'),
      userCount?: long(name='UserCount'),
      userGroupId?: long(name='UserGroupId'),
      userGroupName?: string(name='UserGroupName'),
    }
  ](name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ListUserGroupsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListUserGroupsResponseBody(name='body'),
}

async function listUserGroupsWithOptions(request: ListUserGroupsRequest, runtime: Util.RuntimeOptions): ListUserGroupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.corpId)) {
    query['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.isvSubId)) {
    query['IsvSubId'] = request.isvSubId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListUserGroups',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listUserGroups(request: ListUserGroupsRequest): ListUserGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUserGroupsWithOptions(request, runtime);
}

model ListUsersRequest {
  address?: string(name='Address'),
  age?: int32(name='Age'),
  attachment?: string(name='Attachment'),
  bizId?: string(name='BizId'),
  corpId?: string(name='CorpId'),
  faceImageUrl?: string(name='FaceImageUrl'),
  gender?: int32(name='Gender'),
  idNumber?: string(name='IdNumber'),
  isvSubId?: string(name='IsvSubId'),
  matchingRateThreshold?: string(name='MatchingRateThreshold'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  personList?: map[string]any(name='PersonList'),
  phoneNo?: string(name='PhoneNo'),
  plateNo?: string(name='PlateNo'),
  userGroupId?: long(name='UserGroupId'),
  userList?: map[string]any(name='UserList'),
  userName?: string(name='UserName'),
}

model ListUsersShrinkRequest {
  address?: string(name='Address'),
  age?: int32(name='Age'),
  attachment?: string(name='Attachment'),
  bizId?: string(name='BizId'),
  corpId?: string(name='CorpId'),
  faceImageUrl?: string(name='FaceImageUrl'),
  gender?: int32(name='Gender'),
  idNumber?: string(name='IdNumber'),
  isvSubId?: string(name='IsvSubId'),
  matchingRateThreshold?: string(name='MatchingRateThreshold'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  personListShrink?: string(name='PersonList'),
  phoneNo?: string(name='PhoneNo'),
  plateNo?: string(name='PlateNo'),
  userGroupId?: long(name='UserGroupId'),
  userListShrink?: string(name='UserList'),
  userName?: string(name='UserName'),
}

model ListUsersResponseBody = {
  code?: string(name='Code'),
  data?: {
    pageNumber?: long(name='PageNumber'),
    pageSize?: long(name='PageSize'),
    records?: [ 
      {
        age?: string(name='Age'),
        attachment?: string(name='Attachment'),
        bizId?: string(name='BizId'),
        faceImageUrl?: string(name='FaceImageUrl'),
        gender?: string(name='Gender'),
        idNumber?: string(name='IdNumber'),
        isvSubId?: string(name='IsvSubId'),
        matchingRate?: string(name='MatchingRate'),
        personId?: string(name='PersonId'),
        userGroupId?: int32(name='UserGroupId'),
        userId?: int32(name='UserId'),
        userName?: string(name='UserName'),
      }
    ](name='Records'),
    success?: long(name='Success'),
    total?: long(name='Total'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model ListUsersResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListUsersResponseBody(name='body'),
}

async function listUsersWithOptions(tmpReq: ListUsersRequest, runtime: Util.RuntimeOptions): ListUsersResponse {
  Util.validateModel(tmpReq);
  var request = new ListUsersShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.personList)) {
    request.personListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.personList, 'PersonList', 'json');
  }
  if (!Util.isUnset(tmpReq.userList)) {
    request.userListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userList, 'UserList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.address)) {
    body['Address'] = request.address;
  }
  if (!Util.isUnset(request.age)) {
    body['Age'] = request.age;
  }
  if (!Util.isUnset(request.attachment)) {
    body['Attachment'] = request.attachment;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.faceImageUrl)) {
    body['FaceImageUrl'] = request.faceImageUrl;
  }
  if (!Util.isUnset(request.gender)) {
    body['Gender'] = request.gender;
  }
  if (!Util.isUnset(request.idNumber)) {
    body['IdNumber'] = request.idNumber;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.matchingRateThreshold)) {
    body['MatchingRateThreshold'] = request.matchingRateThreshold;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.personListShrink)) {
    body['PersonList'] = request.personListShrink;
  }
  if (!Util.isUnset(request.phoneNo)) {
    body['PhoneNo'] = request.phoneNo;
  }
  if (!Util.isUnset(request.plateNo)) {
    body['PlateNo'] = request.plateNo;
  }
  if (!Util.isUnset(request.userGroupId)) {
    body['UserGroupId'] = request.userGroupId;
  }
  if (!Util.isUnset(request.userListShrink)) {
    body['UserList'] = request.userListShrink;
  }
  if (!Util.isUnset(request.userName)) {
    body['UserName'] = request.userName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListUsers',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listUsers(request: ListUsersRequest): ListUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUsersWithOptions(request, runtime);
}

model ModifyDeviceRequest {
  audioEnable?: string(name='AudioEnable', example='1'),
  deviceAddress?: string(name='DeviceAddress', example='浙江省杭州市'),
  deviceDirection?: string(name='DeviceDirection'),
  deviceId?: string(name='DeviceId', example='3200000099118700****'),
  deviceIp?: string(name='DeviceIp', example='192.168.XX.XX'),
  deviceModel?: string(name='DeviceModel', example='ACube200-8'),
  deviceName?: string(name='DeviceName', example='阿里云设备'),
  deviceRate?: string(name='DeviceRate', example='4096'),
  deviceResolution?: string(name='DeviceResolution', example='1920*1080'),
  deviceSite?: string(name='DeviceSite'),
  deviceSubType?: string(name='DeviceSubType', example='1'),
  encodeFormat?: string(name='EncodeFormat', example='6'),
  frameRate?: string(name='FrameRate', example='25'),
  govLength?: string(name='GovLength', example='50'),
  latitude?: string(name='Latitude', example='39.916527'),
  longitude?: string(name='Longitude', example='116.397128'),
  OSDTimeEnable?: string(name='OSDTimeEnable', example='1'),
  OSDTimeType?: string(name='OSDTimeType', example='2'),
  OSDTimeX?: string(name='OSDTimeX', example='99'),
  OSDTimeY?: string(name='OSDTimeY', example='1'),
  password?: string(name='Password', example='******'),
  roi?: string(name='Roi'),
  vendor?: string(name='Vendor'),
}

model ModifyDeviceResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model ModifyDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ModifyDeviceResponseBody(name='body'),
}

async function modifyDeviceWithOptions(request: ModifyDeviceRequest, runtime: Util.RuntimeOptions): ModifyDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.audioEnable)) {
    body['AudioEnable'] = request.audioEnable;
  }
  if (!Util.isUnset(request.deviceAddress)) {
    body['DeviceAddress'] = request.deviceAddress;
  }
  if (!Util.isUnset(request.deviceDirection)) {
    body['DeviceDirection'] = request.deviceDirection;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.deviceIp)) {
    body['DeviceIp'] = request.deviceIp;
  }
  if (!Util.isUnset(request.deviceModel)) {
    body['DeviceModel'] = request.deviceModel;
  }
  if (!Util.isUnset(request.deviceName)) {
    body['DeviceName'] = request.deviceName;
  }
  if (!Util.isUnset(request.deviceRate)) {
    body['DeviceRate'] = request.deviceRate;
  }
  if (!Util.isUnset(request.deviceResolution)) {
    body['DeviceResolution'] = request.deviceResolution;
  }
  if (!Util.isUnset(request.deviceSite)) {
    body['DeviceSite'] = request.deviceSite;
  }
  if (!Util.isUnset(request.deviceSubType)) {
    body['DeviceSubType'] = request.deviceSubType;
  }
  if (!Util.isUnset(request.encodeFormat)) {
    body['EncodeFormat'] = request.encodeFormat;
  }
  if (!Util.isUnset(request.frameRate)) {
    body['FrameRate'] = request.frameRate;
  }
  if (!Util.isUnset(request.govLength)) {
    body['GovLength'] = request.govLength;
  }
  if (!Util.isUnset(request.latitude)) {
    body['Latitude'] = request.latitude;
  }
  if (!Util.isUnset(request.longitude)) {
    body['Longitude'] = request.longitude;
  }
  if (!Util.isUnset(request.OSDTimeEnable)) {
    body['OSDTimeEnable'] = request.OSDTimeEnable;
  }
  if (!Util.isUnset(request.OSDTimeType)) {
    body['OSDTimeType'] = request.OSDTimeType;
  }
  if (!Util.isUnset(request.OSDTimeX)) {
    body['OSDTimeX'] = request.OSDTimeX;
  }
  if (!Util.isUnset(request.OSDTimeY)) {
    body['OSDTimeY'] = request.OSDTimeY;
  }
  if (!Util.isUnset(request.password)) {
    body['Password'] = request.password;
  }
  if (!Util.isUnset(request.roi)) {
    body['Roi'] = request.roi;
  }
  if (!Util.isUnset(request.vendor)) {
    body['Vendor'] = request.vendor;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function modifyDevice(request: ModifyDeviceRequest): ModifyDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyDeviceWithOptions(request, runtime);
}

model PeekNvrRequest {
  corpId?: string(name='CorpId', example='2741696169850700929'),
  deviceId?: string(name='DeviceId', example='1101050001132700****'),
}

model PeekNvrResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    idleCount?: long(name='IdleCount', example='1'),
    subDeviceList?: [ 
      {
        associatedPlatform?: string(name='AssociatedPlatform', example='1'),
        subDeviceId?: string(name='SubDeviceId', example='VL_12345_1'),
        subDeviceName?: string(name='SubDeviceName'),
        subDeviceNum?: string(name='SubDeviceNum', example='1'),
        subDeviceStatus?: string(name='SubDeviceStatus', example='1'),
      }
    ](name='SubDeviceList'),
  }(name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
}

model PeekNvrResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: PeekNvrResponseBody(name='body'),
}

async function peekNvrWithOptions(request: PeekNvrRequest, runtime: Util.RuntimeOptions): PeekNvrResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PeekNvr',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function peekNvr(request: PeekNvrRequest): PeekNvrResponse {
  var runtime = new Util.RuntimeOptions{};
  return peekNvrWithOptions(request, runtime);
}

model RaiseDevicesStorageRequest {
  json?: string(name='Json', example='{"Json":"[{\\"DeviceId\\":\\"2101050001132700\\",\\"PictureStorageDay\\":0,\\"VideoStorageDay\\":1,\\"CurrentPictureStorageDay\\":0,\\"PictureStorageSize\\":0,\\"CurrentVideoStorageDay\\":0,\\"VideoStorageSize\\":0},{\\"DeviceId\\":\\"1101050001132700****\\",\\"PictureStorageDay\\":0,\\"VideoStorageDay\\":1,\\"CurrentPictureStorageDay\\":0,\\"PictureStorageSize\\":0,\\"CurrentVideoStorageDay\\":0,\\"VideoStorageSize\\":0}]" }'),
}

model RaiseDevicesStorageResponseBody = {
  code?: string(name='Code', example='200'),
  data?: boolean(name='Data', example='true'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
}

model RaiseDevicesStorageResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RaiseDevicesStorageResponseBody(name='body'),
}

async function raiseDevicesStorageWithOptions(request: RaiseDevicesStorageRequest, runtime: Util.RuntimeOptions): RaiseDevicesStorageResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.json)) {
    body['Json'] = request.json;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RaiseDevicesStorage',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function raiseDevicesStorage(request: RaiseDevicesStorageRequest): RaiseDevicesStorageResponse {
  var runtime = new Util.RuntimeOptions{};
  return raiseDevicesStorageWithOptions(request, runtime);
}

model RecognizeFaceQualityRequest {
  corpId?: string(name='CorpId'),
  picContent?: string(name='PicContent'),
  picFormat?: string(name='PicFormat'),
  picUrl?: string(name='PicUrl'),
}

model RecognizeFaceQualityResponseBody = {
  code?: string(name='Code'),
  data?: {
    attributes?: {
      faceQuality?: string(name='FaceQuality'),
      faceScore?: string(name='FaceScore'),
      faceStyle?: string(name='FaceStyle'),
      leftTopX?: int32(name='LeftTopX'),
      leftTopY?: int32(name='LeftTopY'),
      rightBottomX?: int32(name='RightBottomX'),
      rightBottomY?: int32(name='RightBottomY'),
      targetImageStoragePath?: string(name='TargetImageStoragePath'),
    }(name='Attributes'),
    description?: string(name='Description'),
    qualityScore?: string(name='QualityScore'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model RecognizeFaceQualityResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RecognizeFaceQualityResponseBody(name='body'),
}

async function recognizeFaceQualityWithOptions(request: RecognizeFaceQualityRequest, runtime: Util.RuntimeOptions): RecognizeFaceQualityResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.picContent)) {
    body['PicContent'] = request.picContent;
  }
  if (!Util.isUnset(request.picFormat)) {
    body['PicFormat'] = request.picFormat;
  }
  if (!Util.isUnset(request.picUrl)) {
    body['PicUrl'] = request.picUrl;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RecognizeFaceQuality',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function recognizeFaceQuality(request: RecognizeFaceQualityRequest): RecognizeFaceQualityResponse {
  var runtime = new Util.RuntimeOptions{};
  return recognizeFaceQualityWithOptions(request, runtime);
}

model RecognizeImageRequest {
  corpId?: string(name='CorpId', example='100001'),
  picContent?: string(name='PicContent', example='1'),
  picFormat?: string(name='PicFormat', example='jpg'),
  picUrl?: string(name='PicUrl'),
}

model RecognizeImageResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    bodyList?: [ 
      {
        feature?: string(name='Feature', example='{-0.068247,-0.027062,0...}'),
        fileName?: string(name='FileName', example='1'),
        imageBaseSixFour?: string(name='ImageBaseSixFour', example='1'),
        leftTopX?: string(name='LeftTopX', example='7648'),
        leftTopY?: string(name='LeftTopY', example='6083'),
        localFeature?: string(name='LocalFeature', example='{-0.068247,-0.027062,0...}'),
        respiratorColor?: string(name='RespiratorColor', example='2'),
        rightBottomX?: string(name='RightBottomX', example='1083'),
        rightBottomY?: string(name='RightBottomY', example='2083'),
      }
    ](name='BodyList'),
    faceList?: [ 
      {
        feature?: string(name='Feature', example='{-0.068247,-0.027062,0...}'),
        fileName?: string(name='FileName', example='1'),
        imageBaseSixFour?: string(name='ImageBaseSixFour', example='1'),
        keyPointQuality?: float(name='KeyPointQuality'),
        leftTopX?: string(name='LeftTopX', example='1083'),
        leftTopY?: string(name='LeftTopY', example='2083'),
        localFeature?: string(name='LocalFeature', example='{-0.068247,-0.027062,0...}'),
        quality?: float(name='Quality'),
        respiratorColor?: string(name='RespiratorColor', example='2'),
        rightBottomX?: string(name='RightBottomX', example='2083'),
        rightBottomY?: string(name='RightBottomY', example='2083'),
      }
    ](name='FaceList'),
  }(name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model RecognizeImageResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RecognizeImageResponseBody(name='body'),
}

async function recognizeImageWithOptions(request: RecognizeImageRequest, runtime: Util.RuntimeOptions): RecognizeImageResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.picContent)) {
    body['PicContent'] = request.picContent;
  }
  if (!Util.isUnset(request.picFormat)) {
    body['PicFormat'] = request.picFormat;
  }
  if (!Util.isUnset(request.picUrl)) {
    body['PicUrl'] = request.picUrl;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RecognizeImage',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function recognizeImage(request: RecognizeImageRequest): RecognizeImageResponse {
  var runtime = new Util.RuntimeOptions{};
  return recognizeImageWithOptions(request, runtime);
}

model RegisterDeviceRequest {
  deviceId?: string(name='DeviceId', example='3301100099131700****'),
  deviceSn?: string(name='DeviceSn'),
  deviceTimeStamp?: string(name='DeviceTimeStamp', example='1595836578'),
  serverId?: string(name='ServerId', example='3101010099217000****'),
}

model RegisterDeviceResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='ABCDE01'),
  retryInterval?: string(name='RetryInterval', example='300'),
}

model RegisterDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RegisterDeviceResponseBody(name='body'),
}

async function registerDeviceWithOptions(request: RegisterDeviceRequest, runtime: Util.RuntimeOptions): RegisterDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.deviceSn)) {
    body['DeviceSn'] = request.deviceSn;
  }
  if (!Util.isUnset(request.deviceTimeStamp)) {
    body['DeviceTimeStamp'] = request.deviceTimeStamp;
  }
  if (!Util.isUnset(request.serverId)) {
    body['ServerId'] = request.serverId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RegisterDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function registerDevice(request: RegisterDeviceRequest): RegisterDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return registerDeviceWithOptions(request, runtime);
}

model RemoveCameraForInstanceRequest {
  cameraIds?: [ string ](name='CameraIds'),
  instanceId?: string(name='InstanceId', example='1001****'),
}

model RemoveCameraForInstanceShrinkRequest {
  cameraIdsShrink?: string(name='CameraIds'),
  instanceId?: string(name='InstanceId', example='1001****'),
}

model RemoveCameraForInstanceResponseBody = {
  code?: string(name='Code', example='0'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model RemoveCameraForInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RemoveCameraForInstanceResponseBody(name='body'),
}

async function removeCameraForInstanceWithOptions(tmpReq: RemoveCameraForInstanceRequest, runtime: Util.RuntimeOptions): RemoveCameraForInstanceResponse {
  Util.validateModel(tmpReq);
  var request = new RemoveCameraForInstanceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.cameraIds)) {
    request.cameraIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.cameraIds, 'CameraIds', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.cameraIdsShrink)) {
    body['CameraIds'] = request.cameraIdsShrink;
  }
  if (!Util.isUnset(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RemoveCameraForInstance',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function removeCameraForInstance(request: RemoveCameraForInstanceRequest): RemoveCameraForInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeCameraForInstanceWithOptions(request, runtime);
}

model RemoveSearchItemsRequest {
  searchItemIds?: string(name='SearchItemIds'),
  searchTableId?: string(name='SearchTableId'),
}

model RemoveSearchItemsResponseBody = {
  code?: string(name='Code'),
  data?: {
    deletedItemIds?: string(name='DeletedItemIds'),
    failedItemIds?: string(name='FailedItemIds'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: string(name='Success'),
}

model RemoveSearchItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RemoveSearchItemsResponseBody(name='body'),
}

async function removeSearchItemsWithOptions(request: RemoveSearchItemsRequest, runtime: Util.RuntimeOptions): RemoveSearchItemsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.searchItemIds)) {
    body['SearchItemIds'] = request.searchItemIds;
  }
  if (!Util.isUnset(request.searchTableId)) {
    body['SearchTableId'] = request.searchTableId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RemoveSearchItems',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function removeSearchItems(request: RemoveSearchItemsRequest): RemoveSearchItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeSearchItemsWithOptions(request, runtime);
}

model RemoveWatchItemsRequest {
  watchItemIds?: string(name='WatchItemIds', example='["30f6XXXX","7c2eXXXX","b4a1XXXX"]'),
  watchPolicyId?: string(name='WatchPolicyId', example='300f7e67c82e42b48a197894f512343b'),
}

model RemoveWatchItemsResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    deletedItemIds?: string(name='DeletedItemIds', example='["30f6XXXX","7c2eXXXX","b4a1XXXX"]'),
    failedItemIds?: string(name='FailedItemIds', example='["30f6XXXX","7c2eXXXX","b4a1XXXX"]'),
  }(name='Data'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
}

model RemoveWatchItemsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RemoveWatchItemsResponseBody(name='body'),
}

async function removeWatchItemsWithOptions(request: RemoveWatchItemsRequest, runtime: Util.RuntimeOptions): RemoveWatchItemsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.watchItemIds)) {
    body['WatchItemIds'] = request.watchItemIds;
  }
  if (!Util.isUnset(request.watchPolicyId)) {
    body['WatchPolicyId'] = request.watchPolicyId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RemoveWatchItems',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function removeWatchItems(request: RemoveWatchItemsRequest): RemoveWatchItemsResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeWatchItemsWithOptions(request, runtime);
}

model SaveVideoSummaryTaskVideoRequest {
  corpId?: string(name='CorpId'),
  saveVideo?: boolean(name='SaveVideo'),
  taskId?: long(name='TaskId'),
}

model SaveVideoSummaryTaskVideoResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model SaveVideoSummaryTaskVideoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SaveVideoSummaryTaskVideoResponseBody(name='body'),
}

async function saveVideoSummaryTaskVideoWithOptions(request: SaveVideoSummaryTaskVideoRequest, runtime: Util.RuntimeOptions): SaveVideoSummaryTaskVideoResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.saveVideo)) {
    body['SaveVideo'] = request.saveVideo;
  }
  if (!Util.isUnset(request.taskId)) {
    body['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SaveVideoSummaryTaskVideo',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function saveVideoSummaryTaskVideo(request: SaveVideoSummaryTaskVideoRequest): SaveVideoSummaryTaskVideoResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveVideoSummaryTaskVideoWithOptions(request, runtime);
}

model ScanSubDeviceRequest {
  corpId?: string(name='CorpId', example='100001****'),
  deviceId?: string(name='DeviceId', example='VL_210235C5FG3215000144'),
}

model ScanSubDeviceResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model ScanSubDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ScanSubDeviceResponseBody(name='body'),
}

async function scanSubDeviceWithOptions(request: ScanSubDeviceRequest, runtime: Util.RuntimeOptions): ScanSubDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ScanSubDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function scanSubDevice(request: ScanSubDeviceRequest): ScanSubDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return scanSubDeviceWithOptions(request, runtime);
}

model SearchBodyRequest {
  corpId?: string(name='CorpId'),
  endTimeStamp?: long(name='EndTimeStamp'),
  gbId?: string(name='GbId'),
  optionList?: map[string]any(name='OptionList'),
  pageNo?: int32(name='PageNo'),
  pageSize?: int32(name='PageSize'),
  startTimeStamp?: long(name='StartTimeStamp'),
}

model SearchBodyShrinkRequest {
  corpId?: string(name='CorpId'),
  endTimeStamp?: long(name='EndTimeStamp'),
  gbId?: string(name='GbId'),
  optionListShrink?: string(name='OptionList'),
  pageNo?: int32(name='PageNo'),
  pageSize?: int32(name='PageSize'),
  startTimeStamp?: long(name='StartTimeStamp'),
}

model SearchBodyResponseBody = {
  code?: string(name='Code'),
  data?: {
    pageNo?: int32(name='PageNo'),
    pageSize?: int32(name='PageSize'),
    records?: [ 
      {
        gbId?: string(name='GbId'),
        imageUrl?: string(name='ImageUrl'),
        leftTopX?: float(name='LeftTopX'),
        leftTopY?: float(name='LeftTopY'),
        rightBottomX?: float(name='RightBottomX'),
        rightBottomY?: float(name='RightBottomY'),
        score?: float(name='Score'),
        targetImageUrl?: string(name='TargetImageUrl'),
      }
    ](name='Records'),
    totalCount?: int32(name='TotalCount'),
    totalPage?: int32(name='TotalPage'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model SearchBodyResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SearchBodyResponseBody(name='body'),
}

async function searchBodyWithOptions(tmpReq: SearchBodyRequest, runtime: Util.RuntimeOptions): SearchBodyResponse {
  Util.validateModel(tmpReq);
  var request = new SearchBodyShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.optionList)) {
    request.optionListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.optionList, 'OptionList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.endTimeStamp)) {
    body['EndTimeStamp'] = request.endTimeStamp;
  }
  if (!Util.isUnset(request.gbId)) {
    body['GbId'] = request.gbId;
  }
  if (!Util.isUnset(request.optionListShrink)) {
    body['OptionList'] = request.optionListShrink;
  }
  if (!Util.isUnset(request.pageNo)) {
    body['PageNo'] = request.pageNo;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTimeStamp)) {
    body['StartTimeStamp'] = request.startTimeStamp;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SearchBody',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function searchBody(request: SearchBodyRequest): SearchBodyResponse {
  var runtime = new Util.RuntimeOptions{};
  return searchBodyWithOptions(request, runtime);
}

model SearchFaceRequest {
  corpId?: string(name='CorpId', example='10001'),
  endTimeStamp?: long(name='EndTimeStamp', example='1581688288000'),
  gbId?: string(name='GbId', example='3301101201132799****'),
  optionList?: map[string]any(name='OptionList'),
  pageNo?: int32(name='PageNo', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  startTimeStamp?: long(name='StartTimeStamp', example='1581688288000'),
}

model SearchFaceShrinkRequest {
  corpId?: string(name='CorpId', example='10001'),
  endTimeStamp?: long(name='EndTimeStamp', example='1581688288000'),
  gbId?: string(name='GbId', example='3301101201132799****'),
  optionListShrink?: string(name='OptionList'),
  pageNo?: int32(name='PageNo', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  startTimeStamp?: long(name='StartTimeStamp', example='1581688288000'),
}

model SearchFaceResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNo?: int32(name='PageNo', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    records?: [ 
      {
        gbId?: string(name='GbId', example='3301101201132799****'),
        imageUrl?: string(name='ImageUrl', example='http://xxx/storage/getPicture/vcs-20191011-20191012-hz/81b/yushi/combined_pic/motor/1570773801810845/d0ea703859ce4d65819fcca4b8b7780f.jpg'),
        leftTopX?: float(name='LeftTopX', example='5023'),
        leftTopY?: float(name='LeftTopY', example='5023'),
        matchSuggestion?: string(name='MatchSuggestion'),
        rightBottomX?: float(name='RightBottomX', example='1023'),
        rightBottomY?: float(name='RightBottomY', example='1023'),
        score?: float(name='Score', example='81'),
        sourceId?: string(name='SourceId'),
        targetImageUrl?: string(name='TargetImageUrl', example='http://xxx/storage/getPicture/vcs-20191011-20191012-hz/81b/yushi/combined_pic/motor/1570773801810845/d0ea703859ce4d65819fcca4b8b7780f.jpg'),
      }
    ](name='Records'),
    totalCount?: int32(name='TotalCount', example='10'),
    totalPage?: int32(name='TotalPage', example='1'),
  }(name='Data'),
  message?: string(name='Message', example='Success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model SearchFaceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SearchFaceResponseBody(name='body'),
}

async function searchFaceWithOptions(tmpReq: SearchFaceRequest, runtime: Util.RuntimeOptions): SearchFaceResponse {
  Util.validateModel(tmpReq);
  var request = new SearchFaceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.optionList)) {
    request.optionListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.optionList, 'OptionList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.endTimeStamp)) {
    body['EndTimeStamp'] = request.endTimeStamp;
  }
  if (!Util.isUnset(request.gbId)) {
    body['GbId'] = request.gbId;
  }
  if (!Util.isUnset(request.optionListShrink)) {
    body['OptionList'] = request.optionListShrink;
  }
  if (!Util.isUnset(request.pageNo)) {
    body['PageNo'] = request.pageNo;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTimeStamp)) {
    body['StartTimeStamp'] = request.startTimeStamp;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SearchFace',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function searchFace(request: SearchFaceRequest): SearchFaceResponse {
  var runtime = new Util.RuntimeOptions{};
  return searchFaceWithOptions(request, runtime);
}

model SearchItemRequest {
  itemImageData?: string(name='ItemImageData'),
  itemImageUrl?: string(name='ItemImageUrl'),
  pageNumber?: long(name='PageNumber'),
  pageSize?: long(name='PageSize'),
  searchTableIds?: string(name='SearchTableIds'),
  similarityThreshold?: double(name='SimilarityThreshold'),
}

model SearchItemResponseBody = {
  code?: string(name='Code'),
  data?: {
    pageNumber?: long(name='PageNumber'),
    pageSize?: long(name='PageSize'),
    records?: [ 
      {
        itemId?: string(name='ItemId'),
        itemImageSimilarity?: double(name='ItemImageSimilarity'),
        itemImageUrl?: string(name='ItemImageUrl'),
        itemName?: string(name='ItemName'),
      }
    ](name='Records'),
    totalCount?: long(name='TotalCount'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model SearchItemResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SearchItemResponseBody(name='body'),
}

async function searchItemWithOptions(request: SearchItemRequest, runtime: Util.RuntimeOptions): SearchItemResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.itemImageData)) {
    body['ItemImageData'] = request.itemImageData;
  }
  if (!Util.isUnset(request.itemImageUrl)) {
    body['ItemImageUrl'] = request.itemImageUrl;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.searchTableIds)) {
    body['SearchTableIds'] = request.searchTableIds;
  }
  if (!Util.isUnset(request.similarityThreshold)) {
    body['SimilarityThreshold'] = request.similarityThreshold;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SearchItem',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function searchItem(request: SearchItemRequest): SearchItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return searchItemWithOptions(request, runtime);
}

model SearchObjectRequest {
  algorithmType?: string(name='AlgorithmType', example='damo/yushi'),
  conditions?: map[string]any(name='Conditions', example='{ "key1": [1, 2, 3], "key2": [1, 2] }'),
  corpId?: string(name='CorpId', example='2272486399749917832'),
  deviceList?: map[string]any(name='DeviceList', example='[1,2,3]'),
  endTime?: long(name='EndTime', example='1599811420000'),
  imagePath?: map[string]any(name='ImagePath', example='["TargetImagePath1","TargetImagePath 2"]'),
  objectType?: string(name='ObjectType', example='Face/Body/Motor/Non-Motor'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  picUrl?: string(name='PicUrl', example='http://url'),
  startTime?: long(name='StartTime', example='1599725020000'),
}

model SearchObjectShrinkRequest {
  algorithmType?: string(name='AlgorithmType', example='damo/yushi'),
  conditionsShrink?: string(name='Conditions', example='{ "key1": [1, 2, 3], "key2": [1, 2] }'),
  corpId?: string(name='CorpId', example='2272486399749917832'),
  deviceListShrink?: string(name='DeviceList', example='[1,2,3]'),
  endTime?: long(name='EndTime', example='1599811420000'),
  imagePathShrink?: string(name='ImagePath', example='["TargetImagePath1","TargetImagePath 2"]'),
  objectType?: string(name='ObjectType', example='Face/Body/Motor/Non-Motor'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  picUrl?: string(name='PicUrl', example='http://url'),
  startTime?: long(name='StartTime', example='1599725020000'),
}

model SearchObjectResponseBody = {
  code?: string(name='Code', example='Success'),
  data?: {
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    records?: [ 
      {
        compareResult?: string(name='CompareResult', example='33011012011327999991'),
        deviceID?: string(name='DeviceID', example='33011012011327999991'),
        leftTopX?: int32(name='LeftTopX', example='86'),
        leftTopY?: int32(name='LeftTopY', example='1316'),
        rightBtmX?: int32(name='RightBtmX', example='191'),
        rightBtmY?: int32(name='RightBtmY', example='1389'),
        score?: float(name='Score', example='0'),
        shotTime?: long(name='ShotTime', example='1599811420000'),
        sourceID?: string(name='SourceID', example='330110120119991'),
        sourceImagePath?: string(name='SourceImagePath', example='vcs-20191011-20191012-hz/81b/yushi/combined_pic/motor/1570773801810845/d0ea703859ce4d65819fcca4b8b7780f.jpg?begin=0&end=291500&instance=hz'),
        sourceImageUrl?: string(name='SourceImageUrl', example='http://114.55.170.98:30761/storage/getPicture/vcs-20191011-20191012-hz/81b/yushi/combined_pic/motor/1570773801810845/d0ea703859ce4d65819fcca4b8b7780f.jpg?begin=0&end=291500&instance=hz'),
        targetImagePath?: string(name='TargetImagePath', example='vcs-20191011-20191012-hz/81b/yushi/combined_pic/motor/1570773801810845/d0ea703859ce4d65819fcca4b8b7780f.jpg?begin=0&end=291500&instance=hz'),
        targetImageUrl?: string(name='TargetImageUrl', example='http://114.55.170.98:30761/storage/getPicture/vcs-20191011-20191012-hz/81b/yushi/combined_pic/motor/1570773801810845/d0ea703859ce4d65819fcca4b8b7780f.jpg?begin=0&end=291500&instance=hz'),
      }
    ](name='Records'),
    totalCount?: int32(name='TotalCount', example='10'),
    totalPage?: int32(name='TotalPage', example='2'),
  }(name='Data'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model SearchObjectResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SearchObjectResponseBody(name='body'),
}

async function searchObjectWithOptions(tmpReq: SearchObjectRequest, runtime: Util.RuntimeOptions): SearchObjectResponse {
  Util.validateModel(tmpReq);
  var request = new SearchObjectShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.conditions)) {
    request.conditionsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.conditions, 'Conditions', 'json');
  }
  if (!Util.isUnset(tmpReq.deviceList)) {
    request.deviceListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceList, 'DeviceList', 'json');
  }
  if (!Util.isUnset(tmpReq.imagePath)) {
    request.imagePathShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.imagePath, 'ImagePath', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmType)) {
    body['AlgorithmType'] = request.algorithmType;
  }
  if (!Util.isUnset(request.conditionsShrink)) {
    body['Conditions'] = request.conditionsShrink;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.deviceListShrink)) {
    body['DeviceList'] = request.deviceListShrink;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.imagePathShrink)) {
    body['ImagePath'] = request.imagePathShrink;
  }
  if (!Util.isUnset(request.objectType)) {
    body['ObjectType'] = request.objectType;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.picUrl)) {
    body['PicUrl'] = request.picUrl;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SearchObject',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function searchObject(request: SearchObjectRequest): SearchObjectResponse {
  var runtime = new Util.RuntimeOptions{};
  return searchObjectWithOptions(request, runtime);
}

model SearchTargetRequest {
  beginTime?: string(name='BeginTime', example='2021-01-27T12:00:00Z'),
  corpId?: string(name='CorpId', example='44B0E0XXXX'),
  deviceList?: string(name='DeviceList', example='["1C44674CC97AXXXX", "915E4ACA5866XXXX"]'),
  endTime?: string(name='EndTime', example='2021-01-27T20:00:00Z'),
  modelId?: string(name='ModelId', example='12345'),
  orderBy?: string(name='OrderBy', example='[{"Key":"Timestamp","Type":"Asc"}]'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  similarityThreshold?: double(name='SimilarityThreshold', example='0.92'),
  targetAttributes?: string(name='TargetAttributes', example='[	{  "Key":"HairColor", 	"Value":["4","1"], 	"Score":0.81	 }, 	{  "Key":"GenderCode",   "Value":["1"],   "Score":0.92 	}]'),
  targetImageData?: string(name='TargetImageData'),
  targetImageUrl?: string(name='TargetImageUrl', example='http:/www.aliyun.com/file1'),
  targetType?: string(name='TargetType', example='Face'),
}

model SearchTargetResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    pageNumber?: long(name='PageNumber', example='1'),
    pageSize?: long(name='PageSize', example='10'),
    records?: [ 
      {
        dataDetail?: string(name='DataDetail', example='{"corpId":"123","deviceId":"123"}'),
        deviceId?: string(name='DeviceId', example='001'),
        leftTopX?: long(name='LeftTopX', example='10'),
        leftTopY?: long(name='LeftTopY', example='10'),
        rightBottomX?: long(name='RightBottomX', example='10'),
        rightBottomY?: long(name='RightBottomY', example='10'),
        sourceImageFullUrl?: string(name='SourceImageFullUrl', example='http:/www.aliyun.com/file2'),
        sourceImageUrl?: string(name='SourceImageUrl', example='http:/www.aliyun.com/file1'),
        targetAttributes?: string(name='TargetAttributes', example='[{"Key":"HairColor","Value":"1","Score":0.81},{"Key":"GenderCode","Value":"1","Score":0.92}]'),
        targetImageFullUrl?: string(name='TargetImageFullUrl', example='http:/www.aliyun.com/file2'),
        targetImageSimilarity?: double(name='TargetImageSimilarity', example='0.92'),
        targetImageUrl?: string(name='TargetImageUrl', example='http:/www.aliyun.com/file2'),
        targetType?: string(name='TargetType', example='Face'),
        timestamp?: string(name='Timestamp', example='2021-09-14T12:00:00Z'),
      }
    ](name='Records'),
    totalCount?: long(name='TotalCount', example='30'),
  }(name='Data'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
}

model SearchTargetResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SearchTargetResponseBody(name='body'),
}

async function searchTargetWithOptions(request: SearchTargetRequest, runtime: Util.RuntimeOptions): SearchTargetResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.beginTime)) {
    body['BeginTime'] = request.beginTime;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.deviceList)) {
    body['DeviceList'] = request.deviceList;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.modelId)) {
    body['ModelId'] = request.modelId;
  }
  if (!Util.isUnset(request.orderBy)) {
    body['OrderBy'] = request.orderBy;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.similarityThreshold)) {
    body['SimilarityThreshold'] = request.similarityThreshold;
  }
  if (!Util.isUnset(request.targetAttributes)) {
    body['TargetAttributes'] = request.targetAttributes;
  }
  if (!Util.isUnset(request.targetImageData)) {
    body['TargetImageData'] = request.targetImageData;
  }
  if (!Util.isUnset(request.targetImageUrl)) {
    body['TargetImageUrl'] = request.targetImageUrl;
  }
  if (!Util.isUnset(request.targetType)) {
    body['TargetType'] = request.targetType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SearchTarget',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function searchTarget(request: SearchTargetRequest): SearchTargetResponse {
  var runtime = new Util.RuntimeOptions{};
  return searchTargetWithOptions(request, runtime);
}

model SetAiotStorageInfoRequest {
  eventAlarmMq?: {
    alarmTopic?: string(name='AlarmTopic', example='alarm-test'),
    eventTopic?: string(name='EventTopic', example='alarm-test'),
    instanceId?: string(name='InstanceId', example='vdsafafafsfs'),
    mqType?: string(name='MqType', example='kafka'),
    ramArnRole?: string(name='RamArnRole', example='acs:ram::1180661522270990:role/aiotdeviceossoperation'),
    regionId?: string(name='RegionId', example='cn-hangzhou'),
  }(name='EventAlarmMq'),
  eventAlarmPictureStorage?: {
    bucket?: string(name='Bucket', description='Bucket', example='event-aiot-vcs-test-0325'),
    endpoint?: string(name='Endpoint', example='oss-cn-hangzhou.aliyuncs.com'),
    path?: string(name='Path', example='test'),
    proxy?: string(name='Proxy', example='vcsOssProxy'),
    ramArnRole?: string(name='RamArnRole', example='acs:ram::1180661522270990:role/aiotdeviceossoperation'),
    storageType?: string(name='StorageType', example='oss'),
  }(name='EventAlarmPictureStorage'),
}

model SetAiotStorageInfoShrinkRequest {
  eventAlarmMqShrink?: string(name='EventAlarmMq'),
  eventAlarmPictureStorageShrink?: string(name='EventAlarmPictureStorage'),
}

model SetAiotStorageInfoResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', description='Id of the request', example='89BB9113-FF25-5188-AAE4-E87D01CBA84C'),
}

model SetAiotStorageInfoResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetAiotStorageInfoResponseBody(name='body'),
}

async function setAiotStorageInfoWithOptions(tmpReq: SetAiotStorageInfoRequest, runtime: Util.RuntimeOptions): SetAiotStorageInfoResponse {
  Util.validateModel(tmpReq);
  var request = new SetAiotStorageInfoShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.eventAlarmMq)) {
    request.eventAlarmMqShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.eventAlarmMq, 'EventAlarmMq', 'json');
  }
  if (!Util.isUnset(tmpReq.eventAlarmPictureStorage)) {
    request.eventAlarmPictureStorageShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.eventAlarmPictureStorage, 'EventAlarmPictureStorage', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.eventAlarmMqShrink)) {
    body['EventAlarmMq'] = request.eventAlarmMqShrink;
  }
  if (!Util.isUnset(request.eventAlarmPictureStorageShrink)) {
    body['EventAlarmPictureStorage'] = request.eventAlarmPictureStorageShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SetAiotStorageInfo',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setAiotStorageInfo(request: SetAiotStorageInfoRequest): SetAiotStorageInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return setAiotStorageInfoWithOptions(request, runtime);
}

model SetStreamModeRequest {
  deviceIdList?: string(name='DeviceIdList', example='1101050001132700****'),
  streamMode?: string(name='StreamMode', example='0'),
}

model SetStreamModeResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model SetStreamModeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetStreamModeResponseBody(name='body'),
}

async function setStreamModeWithOptions(request: SetStreamModeRequest, runtime: Util.RuntimeOptions): SetStreamModeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceIdList)) {
    body['DeviceIdList'] = request.deviceIdList;
  }
  if (!Util.isUnset(request.streamMode)) {
    body['StreamMode'] = request.streamMode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SetStreamMode',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setStreamMode(request: SetStreamModeRequest): SetStreamModeResponse {
  var runtime = new Util.RuntimeOptions{};
  return setStreamModeWithOptions(request, runtime);
}

model StartModelServiceRequest {
  modelServiceId?: string(name='ModelServiceId'),
}

model StartModelServiceResponseBody = {
  code?: string(name='Code'),
  data?: {
    modelServiceInstanceId?: string(name='ModelServiceInstanceId'),
    modelServiceInstanceName?: int32(name='ModelServiceInstanceName'),
    modelServiceStatus?: string(name='ModelServiceStatus'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model StartModelServiceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StartModelServiceResponseBody(name='body'),
}

async function startModelServiceWithOptions(request: StartModelServiceRequest, runtime: Util.RuntimeOptions): StartModelServiceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.modelServiceId)) {
    body['ModelServiceId'] = request.modelServiceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'StartModelService',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function startModelService(request: StartModelServiceRequest): StartModelServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return startModelServiceWithOptions(request, runtime);
}

model StartStreamsRequest {
  description?: string(name='Description'),
  deviceIdList?: string(name='DeviceIdList', example='100001****,100002****,100003****'),
}

model StartStreamsResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model StartStreamsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StartStreamsResponseBody(name='body'),
}

async function startStreamsWithOptions(request: StartStreamsRequest, runtime: Util.RuntimeOptions): StartStreamsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.deviceIdList)) {
    body['DeviceIdList'] = request.deviceIdList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'StartStreams',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function startStreams(request: StartStreamsRequest): StartStreamsResponse {
  var runtime = new Util.RuntimeOptions{};
  return startStreamsWithOptions(request, runtime);
}

model StopModelServiceRequest {
  modelServiceId?: string(name='ModelServiceId', example='a1368d26-f2e2-4fe6-9bf7-be46eb84c87e'),
}

model StopModelServiceResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  data?: {
    modelServiceInstanceId?: string(name='ModelServiceInstanceId', example='46329898'),
    modelServiceInstanceName?: int32(name='ModelServiceInstanceName', example='test'),
    modelServiceStatus?: string(name='ModelServiceStatus', example='Init'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='C6B3EA7D-0ABE-5C8C-B721-E42194A303B3'),
}

model StopModelServiceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StopModelServiceResponseBody(name='body'),
}

async function stopModelServiceWithOptions(request: StopModelServiceRequest, runtime: Util.RuntimeOptions): StopModelServiceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.modelServiceId)) {
    body['ModelServiceId'] = request.modelServiceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'StopModelService',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function stopModelService(request: StopModelServiceRequest): StopModelServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopModelServiceWithOptions(request, runtime);
}

model StopMonitorRequest {
  algorithmVendor?: string(name='AlgorithmVendor', example='damo'),
  taskId?: string(name='TaskId', example='d5b65bb43c5242d89b199a360211930c'),
}

model StopMonitorResponseBody = {
  code?: string(name='Code', example='200'),
  data?: string(name='Data', example='true'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='41243305_b0b6_46a1_bf9b_1f9e789bcc81'),
}

model StopMonitorResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StopMonitorResponseBody(name='body'),
}

async function stopMonitorWithOptions(request: StopMonitorRequest, runtime: Util.RuntimeOptions): StopMonitorResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmVendor)) {
    body['AlgorithmVendor'] = request.algorithmVendor;
  }
  if (!Util.isUnset(request.taskId)) {
    body['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'StopMonitor',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function stopMonitor(request: StopMonitorRequest): StopMonitorResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopMonitorWithOptions(request, runtime);
}

model StopStreamsRequest {
  description?: string(name='Description'),
  deviceIdList?: string(name='DeviceIdList', example='100001****,100002****,100003****'),
}

model StopStreamsResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model StopStreamsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StopStreamsResponseBody(name='body'),
}

async function stopStreamsWithOptions(request: StopStreamsRequest, runtime: Util.RuntimeOptions): StopStreamsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.deviceIdList)) {
    body['DeviceIdList'] = request.deviceIdList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'StopStreams',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function stopStreams(request: StopStreamsRequest): StopStreamsResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopStreamsWithOptions(request, runtime);
}

model SyncDeviceTimeRequest {
  deviceSn?: string(name='DeviceSn', example='210235C41T320400****'),
  deviceTimeStamp?: string(name='DeviceTimeStamp', example='1595837187'),
}

model SyncDeviceTimeResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  NTPServer?: string(name='NTPServer', example='ntp1.aliyun.com'),
  requestId?: string(name='RequestId', example='ABCDE01'),
  retryInterval?: string(name='RetryInterval', example='300'),
  syncInterval?: string(name='SyncInterval', example='600'),
  timeStamp?: string(name='TimeStamp', example='1595837187'),
}

model SyncDeviceTimeResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SyncDeviceTimeResponseBody(name='body'),
}

async function syncDeviceTimeWithOptions(request: SyncDeviceTimeRequest, runtime: Util.RuntimeOptions): SyncDeviceTimeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceSn)) {
    body['DeviceSn'] = request.deviceSn;
  }
  if (!Util.isUnset(request.deviceTimeStamp)) {
    body['DeviceTimeStamp'] = request.deviceTimeStamp;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SyncDeviceTime',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function syncDeviceTime(request: SyncDeviceTimeRequest): SyncDeviceTimeResponse {
  var runtime = new Util.RuntimeOptions{};
  return syncDeviceTimeWithOptions(request, runtime);
}

model TestCrossRequest {
  data?: string(name='Data'),
}

model TestCrossResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: string(name='body'),
}

async function testCrossWithOptions(request: TestCrossRequest, runtime: Util.RuntimeOptions): TestCrossResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.data)) {
    body['Data'] = request.data;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'TestCross',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'string',
  };
  return callApi(params, req, runtime);
}

async function testCross(request: TestCrossRequest): TestCrossResponse {
  var runtime = new Util.RuntimeOptions{};
  return testCrossWithOptions(request, runtime);
}

model TryCreateAIInstanceRequest {
  algorithmId?: string(name='AlgorithmId', example='1'),
  cameraNumber?: long(name='CameraNumber'),
  computeType?: string(name='ComputeType', example='StreamCompute'),
  dataSource?: string(name='DataSource', example='Camera'),
  dataSourceTimes?: [ 
    {
      endTime?: string(name='EndTime', example='11:00:00'),
      startTime?: string(name='StartTime', example='10:00:00'),
    }
  ](name='DataSourceTimes'),
  dataType?: string(name='DataType', example='Picture'),
  fps?: long(name='Fps', example='5'),
  instanceType?: string(name='InstanceType', example='Offline'),
  scheduleCycleDates?: [ long ](name='ScheduleCycleDates'),
  scheduleTimes?: [ 
    {
      endTime?: string(name='EndTime', example='11:00:00'),
      startTime?: string(name='StartTime', example='10:00:00'),
    }
  ](name='ScheduleTimes'),
  scheduleType?: string(name='ScheduleType', example='EVERYDAY'),
  spf?: long(name='Spf', example='5'),
}

model TryCreateAIInstanceShrinkRequest {
  algorithmId?: string(name='AlgorithmId', example='1'),
  cameraNumber?: long(name='CameraNumber'),
  computeType?: string(name='ComputeType', example='StreamCompute'),
  dataSource?: string(name='DataSource', example='Camera'),
  dataSourceTimesShrink?: string(name='DataSourceTimes'),
  dataType?: string(name='DataType', example='Picture'),
  fps?: long(name='Fps', example='5'),
  instanceType?: string(name='InstanceType', example='Offline'),
  scheduleCycleDatesShrink?: string(name='ScheduleCycleDates'),
  scheduleTimesShrink?: string(name='ScheduleTimes'),
  scheduleType?: string(name='ScheduleType', example='EVERYDAY'),
  spf?: long(name='Spf', example='5'),
}

model TryCreateAIInstanceResponseBody = {
  code?: string(name='Code', example='0'),
  data?: {
    acuUsed?: long(name='AcuUsed', example='1'),
    storage?: string(name='Storage'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
}

model TryCreateAIInstanceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: TryCreateAIInstanceResponseBody(name='body'),
}

async function tryCreateAIInstanceWithOptions(tmpReq: TryCreateAIInstanceRequest, runtime: Util.RuntimeOptions): TryCreateAIInstanceResponse {
  Util.validateModel(tmpReq);
  var request = new TryCreateAIInstanceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.dataSourceTimes)) {
    request.dataSourceTimesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.dataSourceTimes, 'DataSourceTimes', 'json');
  }
  if (!Util.isUnset(tmpReq.scheduleCycleDates)) {
    request.scheduleCycleDatesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.scheduleCycleDates, 'ScheduleCycleDates', 'json');
  }
  if (!Util.isUnset(tmpReq.scheduleTimes)) {
    request.scheduleTimesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.scheduleTimes, 'ScheduleTimes', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmId)) {
    body['AlgorithmId'] = request.algorithmId;
  }
  if (!Util.isUnset(request.cameraNumber)) {
    body['CameraNumber'] = request.cameraNumber;
  }
  if (!Util.isUnset(request.computeType)) {
    body['ComputeType'] = request.computeType;
  }
  if (!Util.isUnset(request.dataSource)) {
    body['DataSource'] = request.dataSource;
  }
  if (!Util.isUnset(request.dataSourceTimesShrink)) {
    body['DataSourceTimes'] = request.dataSourceTimesShrink;
  }
  if (!Util.isUnset(request.dataType)) {
    body['DataType'] = request.dataType;
  }
  if (!Util.isUnset(request.fps)) {
    body['Fps'] = request.fps;
  }
  if (!Util.isUnset(request.instanceType)) {
    body['InstanceType'] = request.instanceType;
  }
  if (!Util.isUnset(request.scheduleCycleDatesShrink)) {
    body['ScheduleCycleDates'] = request.scheduleCycleDatesShrink;
  }
  if (!Util.isUnset(request.scheduleTimesShrink)) {
    body['ScheduleTimes'] = request.scheduleTimesShrink;
  }
  if (!Util.isUnset(request.scheduleType)) {
    body['ScheduleType'] = request.scheduleType;
  }
  if (!Util.isUnset(request.spf)) {
    body['Spf'] = request.spf;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'TryCreateAIInstance',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function tryCreateAIInstance(request: TryCreateAIInstanceRequest): TryCreateAIInstanceResponse {
  var runtime = new Util.RuntimeOptions{};
  return tryCreateAIInstanceWithOptions(request, runtime);
}

model UnbindCorpGroupRequest {
  corpGroupId?: string(name='CorpGroupId'),
  corpId?: string(name='CorpId'),
}

model UnbindCorpGroupResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UnbindCorpGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UnbindCorpGroupResponseBody(name='body'),
}

async function unbindCorpGroupWithOptions(request: UnbindCorpGroupRequest, runtime: Util.RuntimeOptions): UnbindCorpGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpGroupId)) {
    body['CorpGroupId'] = request.corpGroupId;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UnbindCorpGroup',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function unbindCorpGroup(request: UnbindCorpGroupRequest): UnbindCorpGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return unbindCorpGroupWithOptions(request, runtime);
}

model UnbindDevicesRequest {
  corpId?: string(name='CorpId', example='252060345870948****'),
  deviceId?: string(name='DeviceId', example='VL_210235C5FG3215000144'),
  subDeviceIdList?: string(name='SubDeviceIdList', example='VL_210235C5FG3215000144_1,VL_210235C5FG3215000144_2'),
}

model UnbindDevicesResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    subDeviceList?: [ 
      {
        code?: string(name='Code', example='200'),
        message?: string(name='Message', example='success'),
        subDeviceId?: string(name='SubDeviceId', example='VL_210235C5FG3215000144_1'),
      }
    ](name='SubDeviceList'),
  }(name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
}

model UnbindDevicesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UnbindDevicesResponseBody(name='body'),
}

async function unbindDevicesWithOptions(request: UnbindDevicesRequest, runtime: Util.RuntimeOptions): UnbindDevicesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.subDeviceIdList)) {
    body['SubDeviceIdList'] = request.subDeviceIdList;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UnbindDevices',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function unbindDevices(request: UnbindDevicesRequest): UnbindDevicesResponse {
  var runtime = new Util.RuntimeOptions{};
  return unbindDevicesWithOptions(request, runtime);
}

model UnbindPersonRequest {
  corpId?: string(name='CorpId'),
  isvSubId?: string(name='IsvSubId'),
  profileId?: long(name='ProfileId', example='1'),
}

model UnbindPersonResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: boolean(name='Data', example='true'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='XXXX-XXX-XXXX'),
}

model UnbindPersonResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UnbindPersonResponseBody(name='body'),
}

async function unbindPersonWithOptions(request: UnbindPersonRequest, runtime: Util.RuntimeOptions): UnbindPersonResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.profileId)) {
    body['ProfileId'] = request.profileId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UnbindPerson',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function unbindPerson(request: UnbindPersonRequest): UnbindPersonResponse {
  var runtime = new Util.RuntimeOptions{};
  return unbindPersonWithOptions(request, runtime);
}

model UnbindUserRequest {
  corpId?: string(name='CorpId'),
  isvSubId?: string(name='IsvSubId'),
  userId?: long(name='UserId'),
}

model UnbindUserResponseBody = {
  code?: string(name='Code'),
  data?: boolean(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model UnbindUserResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UnbindUserResponseBody(name='body'),
}

async function unbindUserWithOptions(request: UnbindUserRequest, runtime: Util.RuntimeOptions): UnbindUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UnbindUser',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function unbindUser(request: UnbindUserRequest): UnbindUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return unbindUserWithOptions(request, runtime);
}

model UpdateAiotDeviceRequest {
  aiotDevice?: {
    IPAddr?: string(name='IPAddr', example='10.2.2.1'),
    latitude?: float(name='Latitude', example='4124.24'),
    longitude?: float(name='Longitude', example='2342.34'),
    name?: string(name='Name'),
    place?: string(name='Place'),
    port?: long(name='Port', example='4399'),
  }(name='AiotDevice'),
  id?: string(name='Id', example='356201295345457780132002021072379520015'),
}

model UpdateAiotDeviceShrinkRequest {
  aiotDeviceShrink?: string(name='AiotDevice'),
  id?: string(name='Id', example='356201295345457780132002021072379520015'),
}

model UpdateAiotDeviceResponseBody = {
  aiotDevice?: {
    capDirection?: string(name='CapDirection', example='1'),
    corpId?: string(name='CorpId', example='12234444'),
    deviceId?: string(name='DeviceId', example='3424242344'),
    deviceType?: string(name='DeviceType', example='1'),
    firmwareVersion?: string(name='FirmwareVersion', example='1.0'),
    IPAddr?: string(name='IPAddr', example='10.2.2.1'),
    IPV6Addr?: string(name='IPV6Addr', example='1030::C9B4:FF12:48AA:1A2B'),
    IPv4Gateway?: string(name='IPv4Gateway', example='192.168.1.0'),
    IPv4Netmask?: string(name='IPv4Netmask', example='255.255.255.0'),
    isOnline?: string(name='IsOnline', example='1'),
    latitude?: float(name='Latitude', example='4124.24'),
    longitude?: float(name='Longitude', example='2342.34'),
    MAC?: string(name='MAC', example='90:9c:4a:b6:6e:5d'),
    manufacturer?: string(name='Manufacturer'),
    model?: string(name='Model', example='T423423'),
    monitorAreaDesc?: string(name='MonitorAreaDesc'),
    monitorDirection?: string(name='MonitorDirection', example='1'),
    name?: string(name='Name'),
    orgCode?: string(name='OrgCode', example='444'),
    ownerApsID?: string(name='OwnerApsID', example='111'),
    password?: string(name='Password', example='12345'),
    place?: string(name='Place'),
    placeCode?: string(name='PlaceCode', example='43424'),
    port?: long(name='Port', example='4399'),
    serialNumber?: string(name='SerialNumber', example='41234124124'),
    userId?: string(name='UserId', example='admin'),
  }(name='AiotDevice'),
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', description='Id of the request', example='631BC836-6297-574B-8B68-E3B09D8F45C1'),
}

model UpdateAiotDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateAiotDeviceResponseBody(name='body'),
}

async function updateAiotDeviceWithOptions(tmpReq: UpdateAiotDeviceRequest, runtime: Util.RuntimeOptions): UpdateAiotDeviceResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateAiotDeviceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.aiotDevice)) {
    request.aiotDeviceShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.aiotDevice, 'AiotDevice', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.aiotDeviceShrink)) {
    body['AiotDevice'] = request.aiotDeviceShrink;
  }
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAiotDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateAiotDevice(request: UpdateAiotDeviceRequest): UpdateAiotDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAiotDeviceWithOptions(request, runtime);
}

model UpdateAiotPersonTableRequest {
  id?: string(name='Id', example='356201295345457780132002021072756650048'),
  personTable?: {
    name?: string(name='Name'),
    personTableId?: string(name='PersonTableId', example='33010800001329000000062021120609391400003'),
    type?: long(name='Type', example='3'),
    verificationModelList?: [ long ](name='VerificationModelList'),
  }(name='PersonTable'),
}

model UpdateAiotPersonTableResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  personTable?: {
    deviceId?: string(name='DeviceId', example='3301080000132900000006202112'),
    faceNum?: long(name='FaceNum', example='1'),
    lastChange?: string(name='LastChange', example='20220122102032'),
    name?: string(name='Name'),
    personNum?: long(name='PersonNum', example='1'),
    personTableId?: string(name='PersonTableId', example='33010800001329000000062021120609391400003'),
    totalPersonNum?: long(name='TotalPersonNum', example='100'),
    type?: long(name='Type', example='3'),
    verificationModelList?: [ long ](name='VerificationModelList'),
  }(name='PersonTable'),
  requestId?: string(name='RequestId', description='Id of the request', example='BE37F38F-10C7-5695-9ABD-AEABE15CD105'),
}

model UpdateAiotPersonTableResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateAiotPersonTableResponseBody(name='body'),
}

async function updateAiotPersonTableWithOptions(request: UpdateAiotPersonTableRequest, runtime: Util.RuntimeOptions): UpdateAiotPersonTableResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.personTable)) {
    bodyFlat['PersonTable'] = request.personTable;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAiotPersonTable',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateAiotPersonTable(request: UpdateAiotPersonTableRequest): UpdateAiotPersonTableResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAiotPersonTableWithOptions(request, runtime);
}

model UpdateAiotPersonTableItemRequest {
  id?: string(name='Id', example='356201295345457780132002021112930210049'),
  personTableId?: string(name='PersonTableId', example='33010800001329000000062021120813262100004'),
  personTableItem?: {
    identificationList?: [ 
      {
        number?: string(name='Number', example='453453'),
        type?: long(name='Type', example='2'),
      }
    ](name='IdentificationList'),
    identificationNum?: long(name='IdentificationNum', example='1'),
    imageList?: [ 
      {
        data?: string(name='Data', example='ZHNnc2Fnc2FnZHNnc2V3cjM0NTNhYnNhZ2hyZXFoZWg0NWUzNDQ2MzJoZXc='),
        deviceId?: string(name='DeviceId', example='32425252352352532543534'),
        eventSort?: string(name='EventSort', example='1'),
        featureInfo?: {
          algorithmType?: string(name='AlgorithmType', example='1'),
          algorithmVersion?: string(name='AlgorithmVersion', example='ISFRFR259.2.0'),
          featureData?: string(name='FeatureData', example='ZHNnc2Fnc2FnZHNnc2V3cjM0NTNhYnNhZ2hyZXFoZWg0NWUzNDQ2MzJoZXdicmViZ3JldDM0MjUzNDV0cmVlYnJ3ZzJ0NDIz'),
          imageId?: string(name='ImageId', example='34010800001329000000062021120813262100004'),
          objectId?: string(name='ObjectId', example='330108000013290000000620211208132621000041234590'),
          tabIeId?: string(name='TabIeId', example='33010800001329000000062021120813262100004'),
          vendor?: string(name='Vendor', example='Vendor'),
        }(name='FeatureInfo'),
        fileFormat?: string(name='FileFormat', example='jpg'),
        height?: long(name='Height', example='1920'),
        imageId?: string(name='ImageId', example='33010800001329000000062021120813262100087'),
        shotTime?: string(name='ShotTime', example='20190712122312'),
        size?: long(name='Size', example='456'),
        storagePath?: string(name='StoragePath', example='http://xxxx.jpg'),
        type?: string(name='Type', example='1'),
        width?: long(name='Width', example='1080'),
      }
    ](name='ImageList'),
    imageNum?: long(name='ImageNum', example='1'),
    personCode?: string(name='PersonCode', example='123'),
    personId?: string(name='PersonId', example='330108000013290000000620211208132621000041234567'),
    personName?: string(name='PersonName'),
    remarks?: string(name='Remarks', example='test'),
  }(name='PersonTableItem'),
}

model UpdateAiotPersonTableItemResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  personTableItem?: {
    identificationList?: [ 
      {
        number?: string(name='Number', example='453453'),
        type?: long(name='Type', example='2'),
      }
    ](name='IdentificationList'),
    identificationNum?: long(name='IdentificationNum', example='1'),
    imageList?: [ 
      {
        data?: string(name='Data', example='ZHNnc2Fnc2FnZHNnc2V3cjM0NTNhYnNhZ2hyZXFoZWg0NWUzNDQ2MzJoZXc='),
        deviceId?: string(name='DeviceId', example='32425252352352532543534'),
        eventSort?: string(name='EventSort', example='1'),
        featureInfo?: {
          algorithmType?: string(name='AlgorithmType', example='1'),
          algorithmVersion?: string(name='AlgorithmVersion', example='ISFRFR259.2.0'),
          featureData?: string(name='FeatureData', example='ZHNnc2Fnc2FnZHNnc2V3cjM0NTNhYnNhZ2hyZXFoZWg0NWUzNDQ2MzJoZXdicmViZ3JldDM0MjUzNDV0cmVlYnJ3ZzJ0NDIz'),
          imageId?: string(name='ImageId', example='34010800001329000000062021120813262100004'),
          objectId?: string(name='ObjectId', example='330108000013290000000620211208132621000041234590'),
          tabIed?: string(name='TabIed', example='33010800001329000000062021120813262100004'),
          vendor?: string(name='Vendor', example='Vendor'),
        }(name='FeatureInfo'),
        fileFormat?: string(name='FileFormat', example='jpg'),
        height?: long(name='Height', example='1920'),
        imageId?: string(name='ImageId', example='33010800001329000000062021120813262100087'),
        shotTime?: string(name='ShotTime', example='20190712122312'),
        size?: long(name='Size', example='456'),
        storagePath?: string(name='StoragePath', example='http://xxxx.jpg'),
        type?: string(name='Type', example='1'),
        width?: long(name='Width', example='1080'),
      }
    ](name='ImageList'),
    imageNum?: long(name='ImageNum', example='1'),
    lastChange?: string(name='LastChange', example='20220123122312'),
    personCode?: string(name='PersonCode', example='123'),
    personId?: string(name='PersonId', example='330108000013290000000620211208132621000041234567'),
    personName?: string(name='PersonName'),
    personTableId?: string(name='PersonTableId', example='33010800001329000000062021120813262100004'),
    remarks?: string(name='Remarks', example='test'),
  }(name='PersonTableItem'),
  requestId?: string(name='RequestId', description='Id of the request', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
}

model UpdateAiotPersonTableItemResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateAiotPersonTableItemResponseBody(name='body'),
}

async function updateAiotPersonTableItemWithOptions(request: UpdateAiotPersonTableItemRequest, runtime: Util.RuntimeOptions): UpdateAiotPersonTableItemResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.personTableId)) {
    body['PersonTableId'] = request.personTableId;
  }
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.personTableItem)) {
    bodyFlat['PersonTableItem'] = request.personTableItem;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAiotPersonTableItem',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateAiotPersonTableItem(request: UpdateAiotPersonTableItemRequest): UpdateAiotPersonTableItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAiotPersonTableItemWithOptions(request, runtime);
}

model UpdateAiotVehicleTableItemRequest {
  id?: string(name='Id', example='356201295345457780132002021112930210049'),
  vehicleTableId?: string(name='VehicleTableId', example='1'),
  vehicleTableItem?: {
    beginTime?: string(name='BeginTime', example='20201230083000'),
    endTime?: string(name='EndTime', example='20211230083000'),
    ownerName?: string(name='OwnerName'),
    phoneNo?: string(name='PhoneNo', example='181****5023'),
    plateNo?: string(name='PlateNo'),
    remarks?: string(name='Remarks'),
    vehicleTableItemId?: string(name='VehicleTableItemId'),
  }(name='VehicleTableItem'),
}

model UpdateAiotVehicleTableItemShrinkRequest {
  id?: string(name='Id', example='356201295345457780132002021112930210049'),
  vehicleTableId?: string(name='VehicleTableId', example='1'),
  vehicleTableItemShrink?: string(name='VehicleTableItem'),
}

model UpdateAiotVehicleTableItemResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='89BB9113-FF25-5188-AAE4-E87D01CBA84C'),
  vehicleTableItem?: {
    beginTime?: string(name='BeginTime', example='20201230083000'),
    endTime?: string(name='EndTime', example='20211230083000'),
    ownerName?: string(name='OwnerName'),
    phoneNo?: string(name='PhoneNo', example='181****5023'),
    plateNo?: string(name='PlateNo'),
    remarks?: string(name='Remarks'),
    vehicleTableId?: string(name='VehicleTableId', example='1'),
    vehicleTableItemId?: string(name='VehicleTableItemId'),
  }(name='VehicleTableItem'),
}

model UpdateAiotVehicleTableItemResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateAiotVehicleTableItemResponseBody(name='body'),
}

async function updateAiotVehicleTableItemWithOptions(tmpReq: UpdateAiotVehicleTableItemRequest, runtime: Util.RuntimeOptions): UpdateAiotVehicleTableItemResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateAiotVehicleTableItemShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.vehicleTableItem)) {
    request.vehicleTableItemShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.vehicleTableItem, 'VehicleTableItem', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.vehicleTableId)) {
    body['VehicleTableId'] = request.vehicleTableId;
  }
  if (!Util.isUnset(request.vehicleTableItemShrink)) {
    body['VehicleTableItem'] = request.vehicleTableItemShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAiotVehicleTableItem',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateAiotVehicleTableItem(request: UpdateAiotVehicleTableItemRequest): UpdateAiotVehicleTableItemResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateAiotVehicleTableItemWithOptions(request, runtime);
}

model UpdateCorpRequest {
  appName?: string(name='AppName'),
  corpId?: string(name='CorpId', example='10002'),
  corpName?: string(name='CorpName'),
  description?: string(name='Description'),
  iconPath?: string(name='IconPath', example='https://xx.com/xx.jpg'),
  isvSubId?: string(name='IsvSubId', example='001'),
  parentCorpId?: string(name='ParentCorpId', example='10001'),
}

model UpdateCorpResponseBody = {
  code?: string(name='Code', example='200'),
  data?: string(name='Data', example='success'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model UpdateCorpResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateCorpResponseBody(name='body'),
}

async function updateCorpWithOptions(request: UpdateCorpRequest, runtime: Util.RuntimeOptions): UpdateCorpResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appName)) {
    body['AppName'] = request.appName;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.corpName)) {
    body['CorpName'] = request.corpName;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.iconPath)) {
    body['IconPath'] = request.iconPath;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.parentCorpId)) {
    body['ParentCorpId'] = request.parentCorpId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateCorp',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateCorp(request: UpdateCorpRequest): UpdateCorpResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateCorpWithOptions(request, runtime);
}

model UpdateDataSourceRequest {
  dataSourceId?: string(name='DataSourceId', example='ds_123'),
  dataSourceName?: string(name='DataSourceName', example='PicDataSource'),
  description?: string(name='Description', example='DataSource for aliyun'),
  url?: string(name='Url', example='http://........'),
}

model UpdateDataSourceResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='xbxxx-wwsde-wwww'),
}

model UpdateDataSourceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateDataSourceResponseBody(name='body'),
}

async function updateDataSourceWithOptions(request: UpdateDataSourceRequest, runtime: Util.RuntimeOptions): UpdateDataSourceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.dataSourceId)) {
    body['DataSourceId'] = request.dataSourceId;
  }
  if (!Util.isUnset(request.dataSourceName)) {
    body['DataSourceName'] = request.dataSourceName;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.url)) {
    body['Url'] = request.url;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateDataSource',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateDataSource(request: UpdateDataSourceRequest): UpdateDataSourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDataSourceWithOptions(request, runtime);
}

model UpdateDeviceRequest {
  bitRate?: string(name='BitRate', example='1 Mbps'),
  corpId?: string(name='CorpId', example='10001'),
  deviceAddress?: string(name='DeviceAddress'),
  deviceDirection?: string(name='DeviceDirection'),
  deviceName?: string(name='DeviceName'),
  deviceResolution?: string(name='DeviceResolution', example='1080P'),
  deviceSite?: string(name='DeviceSite'),
  deviceType?: string(name='DeviceType', example='IPC'),
  gbId?: string(name='GbId', example='3301101201132799****'),
  vendor?: string(name='Vendor'),
}

model UpdateDeviceResponseBody = {
  code?: string(name='Code', example='200'),
  data?: string(name='Data', example='success'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
}

model UpdateDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateDeviceResponseBody(name='body'),
}

async function updateDeviceWithOptions(request: UpdateDeviceRequest, runtime: Util.RuntimeOptions): UpdateDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bitRate)) {
    body['BitRate'] = request.bitRate;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.deviceAddress)) {
    body['DeviceAddress'] = request.deviceAddress;
  }
  if (!Util.isUnset(request.deviceDirection)) {
    body['DeviceDirection'] = request.deviceDirection;
  }
  if (!Util.isUnset(request.deviceName)) {
    body['DeviceName'] = request.deviceName;
  }
  if (!Util.isUnset(request.deviceResolution)) {
    body['DeviceResolution'] = request.deviceResolution;
  }
  if (!Util.isUnset(request.deviceSite)) {
    body['DeviceSite'] = request.deviceSite;
  }
  if (!Util.isUnset(request.deviceType)) {
    body['DeviceType'] = request.deviceType;
  }
  if (!Util.isUnset(request.gbId)) {
    body['GbId'] = request.gbId;
  }
  if (!Util.isUnset(request.vendor)) {
    body['Vendor'] = request.vendor;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateDevice(request: UpdateDeviceRequest): UpdateDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDeviceWithOptions(request, runtime);
}

model UpdateDeviceCaptureStrategyRequest {
  deviceCode?: string(name='DeviceCode', example='33010600991327000049'),
  deviceType?: string(name='DeviceType', example='IPC'),
  mondayCaptureStrategy?: string(name='MondayCaptureStrategy', example='1为定时抓取，2为动态检测'),
}

model UpdateDeviceCaptureStrategyResponseBody = {
  code?: string(name='Code', example='0'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='6d0f234c-5be7-45d4-9664-7fe3128e0553'),
}

model UpdateDeviceCaptureStrategyResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateDeviceCaptureStrategyResponseBody(name='body'),
}

async function updateDeviceCaptureStrategyWithOptions(request: UpdateDeviceCaptureStrategyRequest, runtime: Util.RuntimeOptions): UpdateDeviceCaptureStrategyResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceCode)) {
    body['DeviceCode'] = request.deviceCode;
  }
  if (!Util.isUnset(request.deviceType)) {
    body['DeviceType'] = request.deviceType;
  }
  if (!Util.isUnset(request.mondayCaptureStrategy)) {
    body['MondayCaptureStrategy'] = request.mondayCaptureStrategy;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateDeviceCaptureStrategy',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateDeviceCaptureStrategy(request: UpdateDeviceCaptureStrategyRequest): UpdateDeviceCaptureStrategyResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDeviceCaptureStrategyWithOptions(request, runtime);
}

model UpdateDevicesStorageRequest {
  updateStorageRequests?: [ 
    {
      deviceIds?: string(name='DeviceIds', example='0123456789,012345678910,0212345678910'),
      storageDays?: [ 
        {
          storageDays?: long(name='StorageDays', example='20'),
          storageType?: string(name='StorageType', example='PICTURE'),
        }
      ](name='StorageDays'),
    }
  ](name='UpdateStorageRequests'),
}

model UpdateDevicesStorageShrinkRequest {
  updateStorageRequestsShrink?: string(name='UpdateStorageRequests'),
}

model UpdateDevicesStorageResponseBody = {
  code?: string(name='Code', example='0'),
  data?: boolean(name='Data', example='true'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', description='Id of the request', example='D001BEB9-A281-4BF0-B595-512A5CBDC122'),
  success?: boolean(name='Success', example='true'),
}

model UpdateDevicesStorageResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateDevicesStorageResponseBody(name='body'),
}

async function updateDevicesStorageWithOptions(tmpReq: UpdateDevicesStorageRequest, runtime: Util.RuntimeOptions): UpdateDevicesStorageResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateDevicesStorageShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.updateStorageRequests)) {
    request.updateStorageRequestsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.updateStorageRequests, 'UpdateStorageRequests', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.updateStorageRequestsShrink)) {
    body['UpdateStorageRequests'] = request.updateStorageRequestsShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateDevicesStorage',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateDevicesStorage(request: UpdateDevicesStorageRequest): UpdateDevicesStorageResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDevicesStorageWithOptions(request, runtime);
}

model UpdateDoubleVerificationGroupRequest {
  doubleVerificationGroup?: {
    groupId?: string(name='GroupId'),
    interval?: long(name='Interval'),
    memberNumber?: long(name='MemberNumber'),
    personIdList?: [ 
      {
        personId?: string(name='PersonId'),
        personTableId?: string(name='PersonTableId'),
      }
    ](name='PersonIdList'),
  }(name='DoubleVerificationGroup'),
  id?: string(name='Id'),
}

model UpdateDoubleVerificationGroupResponseBody = {
  code?: string(name='Code'),
  doubleVerificationGroup?: {
    deviceId?: string(name='DeviceId'),
    enabled?: string(name='Enabled'),
    groupId?: string(name='GroupId'),
    interval?: long(name='Interval'),
    lastChange?: string(name='LastChange'),
    memberNumber?: long(name='MemberNumber'),
    personIdList?: [ 
      {
        personId?: string(name='PersonId'),
        personTableId?: string(name='PersonTableId'),
      }
    ](name='PersonIdList'),
  }(name='DoubleVerificationGroup'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model UpdateDoubleVerificationGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateDoubleVerificationGroupResponseBody(name='body'),
}

async function updateDoubleVerificationGroupWithOptions(request: UpdateDoubleVerificationGroupRequest, runtime: Util.RuntimeOptions): UpdateDoubleVerificationGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.doubleVerificationGroup)) {
    bodyFlat['DoubleVerificationGroup'] = request.doubleVerificationGroup;
  }
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateDoubleVerificationGroup',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateDoubleVerificationGroup(request: UpdateDoubleVerificationGroupRequest): UpdateDoubleVerificationGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateDoubleVerificationGroupWithOptions(request, runtime);
}

model UpdateModelServiceRequest {
  clientToken?: string(name='ClientToken'),
  modelServiceId?: string(name='ModelServiceId'),
  modelServiceName?: string(name='ModelServiceName'),
  qpsRequired?: int32(name='QpsRequired'),
}

model UpdateModelServiceResponseBody = {
  code?: string(name='Code'),
  data?: {
    algorithmCode?: string(name='AlgorithmCode'),
    modelServiceInstanceId?: string(name='ModelServiceInstanceId'),
    modelServiceInstanceName?: string(name='ModelServiceInstanceName'),
    modelServiceStatus?: string(name='ModelServiceStatus'),
    qpsRequired?: int32(name='QpsRequired'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model UpdateModelServiceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateModelServiceResponseBody(name='body'),
}

async function updateModelServiceWithOptions(request: UpdateModelServiceRequest, runtime: Util.RuntimeOptions): UpdateModelServiceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.modelServiceId)) {
    body['ModelServiceId'] = request.modelServiceId;
  }
  if (!Util.isUnset(request.modelServiceName)) {
    body['ModelServiceName'] = request.modelServiceName;
  }
  if (!Util.isUnset(request.qpsRequired)) {
    body['QpsRequired'] = request.qpsRequired;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateModelService',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateModelService(request: UpdateModelServiceRequest): UpdateModelServiceResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateModelServiceWithOptions(request, runtime);
}

model UpdateMonitorRequest {
  algorithmVendor?: string(name='AlgorithmVendor', example='damo'),
  attributeName?: string(name='AttributeName', example='PlateNo'),
  attributeOperateType?: string(name='AttributeOperateType', example='ADD'),
  attributeValueList?: string(name='AttributeValueList'),
  corpId?: string(name='CorpId', example='10001'),
  description?: string(name='Description'),
  deviceList?: string(name='DeviceList', example='33011012011327990001,33011012011327990002'),
  deviceOperateType?: string(name='DeviceOperateType', example='ADD'),
  notifierAppSecret?: string(name='NotifierAppSecret'),
  notifierExtendValues?: string(name='NotifierExtendValues'),
  notifierTimeOut?: int32(name='NotifierTimeOut'),
  notifierType?: string(name='NotifierType'),
  notifierUrl?: string(name='NotifierUrl'),
  picList?: string(name='PicList', example='http://xxx/0/4ed87f4f04c14a259f3da12ff46b9125.jpg,http://xxx/0/4ed87f4f04c14a259f3da12ff46b9126.jpg'),
  picOperateType?: string(name='PicOperateType', example='ADD'),
  ruleExpression?: string(name='RuleExpression'),
  ruleName?: string(name='RuleName', example='un_mask_match'),
  taskId?: string(name='TaskId', example='d5b65bb43c5242d89b199a360211930c'),
}

model UpdateMonitorResponseBody = {
  code?: string(name='Code', example='200'),
  data?: string(name='Data', example='{"taskId": "d5b65bb43c5242d89b199a360211930c" }'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='ff519c35_e070_4da3_a3d0_cfe5c9b4eb74'),
}

model UpdateMonitorResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateMonitorResponseBody(name='body'),
}

async function updateMonitorWithOptions(request: UpdateMonitorRequest, runtime: Util.RuntimeOptions): UpdateMonitorResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmVendor)) {
    body['AlgorithmVendor'] = request.algorithmVendor;
  }
  if (!Util.isUnset(request.attributeName)) {
    body['AttributeName'] = request.attributeName;
  }
  if (!Util.isUnset(request.attributeOperateType)) {
    body['AttributeOperateType'] = request.attributeOperateType;
  }
  if (!Util.isUnset(request.attributeValueList)) {
    body['AttributeValueList'] = request.attributeValueList;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.deviceList)) {
    body['DeviceList'] = request.deviceList;
  }
  if (!Util.isUnset(request.deviceOperateType)) {
    body['DeviceOperateType'] = request.deviceOperateType;
  }
  if (!Util.isUnset(request.notifierAppSecret)) {
    body['NotifierAppSecret'] = request.notifierAppSecret;
  }
  if (!Util.isUnset(request.notifierExtendValues)) {
    body['NotifierExtendValues'] = request.notifierExtendValues;
  }
  if (!Util.isUnset(request.notifierTimeOut)) {
    body['NotifierTimeOut'] = request.notifierTimeOut;
  }
  if (!Util.isUnset(request.notifierType)) {
    body['NotifierType'] = request.notifierType;
  }
  if (!Util.isUnset(request.notifierUrl)) {
    body['NotifierUrl'] = request.notifierUrl;
  }
  if (!Util.isUnset(request.picList)) {
    body['PicList'] = request.picList;
  }
  if (!Util.isUnset(request.picOperateType)) {
    body['PicOperateType'] = request.picOperateType;
  }
  if (!Util.isUnset(request.ruleExpression)) {
    body['RuleExpression'] = request.ruleExpression;
  }
  if (!Util.isUnset(request.ruleName)) {
    body['RuleName'] = request.ruleName;
  }
  if (!Util.isUnset(request.taskId)) {
    body['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateMonitor',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateMonitor(request: UpdateMonitorRequest): UpdateMonitorResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateMonitorWithOptions(request, runtime);
}

model UpdateProfileRequest {
  bizId?: string(name='BizId'),
  catalogId?: long(name='CatalogId', example='1'),
  corpId?: string(name='CorpId'),
  faceUrl?: string(name='FaceUrl'),
  gender?: int32(name='Gender', example='1'),
  idNumber?: string(name='IdNumber'),
  isvSubId?: string(name='IsvSubId'),
  liveAddress?: string(name='LiveAddress'),
  name?: string(name='Name'),
  phoneNo?: string(name='PhoneNo'),
  plateNo?: string(name='PlateNo'),
  profileId?: long(name='ProfileId', example='1'),
  sceneType?: string(name='SceneType'),
}

model UpdateProfileResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: string(name='Data', example='true'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='XXXX-22222'),
}

model UpdateProfileResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateProfileResponseBody(name='body'),
}

async function updateProfileWithOptions(request: UpdateProfileRequest, runtime: Util.RuntimeOptions): UpdateProfileResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.catalogId)) {
    body['CatalogId'] = request.catalogId;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.faceUrl)) {
    body['FaceUrl'] = request.faceUrl;
  }
  if (!Util.isUnset(request.gender)) {
    body['Gender'] = request.gender;
  }
  if (!Util.isUnset(request.idNumber)) {
    body['IdNumber'] = request.idNumber;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.liveAddress)) {
    body['LiveAddress'] = request.liveAddress;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.phoneNo)) {
    body['PhoneNo'] = request.phoneNo;
  }
  if (!Util.isUnset(request.plateNo)) {
    body['PlateNo'] = request.plateNo;
  }
  if (!Util.isUnset(request.profileId)) {
    body['ProfileId'] = request.profileId;
  }
  if (!Util.isUnset(request.sceneType)) {
    body['SceneType'] = request.sceneType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateProfile',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateProfile(request: UpdateProfileRequest): UpdateProfileResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateProfileWithOptions(request, runtime);
}

model UpdateProfileCatalogRequest {
  catalogId?: long(name='CatalogId', example='1'),
  catalogName?: string(name='CatalogName'),
  corpId?: string(name='CorpId'),
  isvSubId?: string(name='IsvSubId'),
}

model UpdateProfileCatalogResponseBody = {
  code?: string(name='Code', example='OK'),
  data?: {
    catalogId?: long(name='CatalogId', example='1'),
    catalogName?: string(name='CatalogName'),
    isvSubId?: string(name='IsvSubId'),
    parentCatalogId?: string(name='ParentCatalogId', example='0'),
    profileCount?: long(name='ProfileCount', example='0'),
  }(name='Data'),
  message?: string(name='Message', example='SUCCESS'),
  requestId?: string(name='RequestId', example='XXXX-22222'),
}

model UpdateProfileCatalogResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateProfileCatalogResponseBody(name='body'),
}

async function updateProfileCatalogWithOptions(request: UpdateProfileCatalogRequest, runtime: Util.RuntimeOptions): UpdateProfileCatalogResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.catalogId)) {
    body['CatalogId'] = request.catalogId;
  }
  if (!Util.isUnset(request.catalogName)) {
    body['CatalogName'] = request.catalogName;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateProfileCatalog',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateProfileCatalog(request: UpdateProfileCatalogRequest): UpdateProfileCatalogResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateProfileCatalogWithOptions(request, runtime);
}

model UpdateSearchTableRequest {
  algorithmId?: string(name='AlgorithmId'),
  searchTableId?: string(name='SearchTableId'),
  searchTableName?: string(name='SearchTableName'),
}

model UpdateSearchTableResponseBody = {
  code?: string(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  success?: boolean(name='Success'),
}

model UpdateSearchTableResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateSearchTableResponseBody(name='body'),
}

async function updateSearchTableWithOptions(request: UpdateSearchTableRequest, runtime: Util.RuntimeOptions): UpdateSearchTableResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.algorithmId)) {
    body['AlgorithmId'] = request.algorithmId;
  }
  if (!Util.isUnset(request.searchTableId)) {
    body['SearchTableId'] = request.searchTableId;
  }
  if (!Util.isUnset(request.searchTableName)) {
    body['SearchTableName'] = request.searchTableName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateSearchTable',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateSearchTable(request: UpdateSearchTableRequest): UpdateSearchTableResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateSearchTableWithOptions(request, runtime);
}

model UpdateUserRequest {
  address?: string(name='Address'),
  age?: int32(name='Age'),
  attachment?: string(name='Attachment'),
  bizId?: string(name='BizId'),
  corpId?: string(name='CorpId'),
  faceImageContent?: string(name='FaceImageContent'),
  faceImageUrl?: string(name='FaceImageUrl'),
  gender?: int32(name='Gender'),
  idNumber?: string(name='IdNumber'),
  isvSubId?: string(name='IsvSubId'),
  phoneNo?: string(name='PhoneNo'),
  plateNo?: string(name='PlateNo'),
  userGroupId?: long(name='UserGroupId'),
  userId?: long(name='UserId'),
  userName?: string(name='UserName'),
}

model UpdateUserResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model UpdateUserResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateUserResponseBody(name='body'),
}

async function updateUserWithOptions(request: UpdateUserRequest, runtime: Util.RuntimeOptions): UpdateUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.address)) {
    body['Address'] = request.address;
  }
  if (!Util.isUnset(request.age)) {
    body['Age'] = request.age;
  }
  if (!Util.isUnset(request.attachment)) {
    body['Attachment'] = request.attachment;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.faceImageContent)) {
    body['FaceImageContent'] = request.faceImageContent;
  }
  if (!Util.isUnset(request.faceImageUrl)) {
    body['FaceImageUrl'] = request.faceImageUrl;
  }
  if (!Util.isUnset(request.gender)) {
    body['Gender'] = request.gender;
  }
  if (!Util.isUnset(request.idNumber)) {
    body['IdNumber'] = request.idNumber;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.phoneNo)) {
    body['PhoneNo'] = request.phoneNo;
  }
  if (!Util.isUnset(request.plateNo)) {
    body['PlateNo'] = request.plateNo;
  }
  if (!Util.isUnset(request.userGroupId)) {
    body['UserGroupId'] = request.userGroupId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.userName)) {
    body['UserName'] = request.userName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateUser',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateUser(request: UpdateUserRequest): UpdateUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateUserWithOptions(request, runtime);
}

model UpdateUserGroupRequest {
  corpId?: string(name='CorpId'),
  isvSubId?: string(name='IsvSubId'),
  userGroupId?: long(name='UserGroupId'),
  userGroupName?: string(name='UserGroupName'),
}

model UpdateUserGroupResponseBody = {
  code?: string(name='Code'),
  data?: {
    isvSubId?: string(name='IsvSubId'),
    parentUserGroupId?: string(name='ParentUserGroupId'),
    userCount?: long(name='UserCount'),
    userGroupId?: long(name='UserGroupId'),
    userGroupName?: string(name='UserGroupName'),
  }(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model UpdateUserGroupResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateUserGroupResponseBody(name='body'),
}

async function updateUserGroupWithOptions(request: UpdateUserGroupRequest, runtime: Util.RuntimeOptions): UpdateUserGroupResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.isvSubId)) {
    body['IsvSubId'] = request.isvSubId;
  }
  if (!Util.isUnset(request.userGroupId)) {
    body['UserGroupId'] = request.userGroupId;
  }
  if (!Util.isUnset(request.userGroupName)) {
    body['UserGroupName'] = request.userGroupName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateUserGroup',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateUserGroup(request: UpdateUserGroupRequest): UpdateUserGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateUserGroupWithOptions(request, runtime);
}

model UpdateWatchPolicyRequest {
  itemMatchType?: string(name='ItemMatchType', example='ByAttributes'),
  similarityThreshold?: double(name='SimilarityThreshold', example='0.92'),
  targetType?: string(name='TargetType', example='Event'),
  watchMode?: string(name='WatchMode', example='NotifyIfInList'),
  watchPolicyId?: string(name='WatchPolicyId', example='300f7e67c82e42b48a197894f512343b'),
  watchPolicyName?: string(name='WatchPolicyName', example='example'),
}

model UpdateWatchPolicyResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
}

model UpdateWatchPolicyResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateWatchPolicyResponseBody(name='body'),
}

async function updateWatchPolicyWithOptions(request: UpdateWatchPolicyRequest, runtime: Util.RuntimeOptions): UpdateWatchPolicyResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.itemMatchType)) {
    body['ItemMatchType'] = request.itemMatchType;
  }
  if (!Util.isUnset(request.similarityThreshold)) {
    body['SimilarityThreshold'] = request.similarityThreshold;
  }
  if (!Util.isUnset(request.targetType)) {
    body['TargetType'] = request.targetType;
  }
  if (!Util.isUnset(request.watchMode)) {
    body['WatchMode'] = request.watchMode;
  }
  if (!Util.isUnset(request.watchPolicyId)) {
    body['WatchPolicyId'] = request.watchPolicyId;
  }
  if (!Util.isUnset(request.watchPolicyName)) {
    body['WatchPolicyName'] = request.watchPolicyName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateWatchPolicy',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateWatchPolicy(request: UpdateWatchPolicyRequest): UpdateWatchPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateWatchPolicyWithOptions(request, runtime);
}

model UpdateWatchTaskRequest {
  description?: string(name='Description'),
  deviceList?: string(name='DeviceList', example='["1C44674CC97AXXXX", "915E4ACA5866XXXX"]'),
  messageReceiver?: string(name='MessageReceiver', example='{   "MessageQueue": "Kafka",   "Config": {     "BootstrapServers": "127.0.0.1:9092,127.0.0.2:9092",     "Topic": "topic_for_put_message",     "Authorization": "SASL",     "SASL": {       "Type": "PLAIN",       "Username": "username_for_put_message",       "Password": "password_for_put_message"     }   } }'),
  scheduleCycleDates?: string(name='ScheduleCycleDates', example='[1, 4, 6]'),
  scheduleTimes?: string(name='ScheduleTimes', example='[{"StartTime":"10:00:00","EndTime":"11:00:00"}]'),
  scheduleType?: string(name='ScheduleType', example='EVERYDAY'),
  taskName?: string(name='TaskName', example='example'),
  watchPolicyIds?: string(name='WatchPolicyIds', example='["30fXXXX","7c8XXXX","b48XXXX"]'),
  watchTaskId?: string(name='WatchTaskId', example='304E63XXXX'),
}

model UpdateWatchTaskResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='46329898-489C-4E63-9BA1-C1DA5C5D0986'),
  success?: boolean(name='Success', example='true'),
}

model UpdateWatchTaskResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateWatchTaskResponseBody(name='body'),
}

async function updateWatchTaskWithOptions(request: UpdateWatchTaskRequest, runtime: Util.RuntimeOptions): UpdateWatchTaskResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.deviceList)) {
    body['DeviceList'] = request.deviceList;
  }
  if (!Util.isUnset(request.messageReceiver)) {
    body['MessageReceiver'] = request.messageReceiver;
  }
  if (!Util.isUnset(request.scheduleCycleDates)) {
    body['ScheduleCycleDates'] = request.scheduleCycleDates;
  }
  if (!Util.isUnset(request.scheduleTimes)) {
    body['ScheduleTimes'] = request.scheduleTimes;
  }
  if (!Util.isUnset(request.scheduleType)) {
    body['ScheduleType'] = request.scheduleType;
  }
  if (!Util.isUnset(request.taskName)) {
    body['TaskName'] = request.taskName;
  }
  if (!Util.isUnset(request.watchPolicyIds)) {
    body['WatchPolicyIds'] = request.watchPolicyIds;
  }
  if (!Util.isUnset(request.watchTaskId)) {
    body['WatchTaskId'] = request.watchTaskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateWatchTask',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateWatchTask(request: UpdateWatchTaskRequest): UpdateWatchTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateWatchTaskWithOptions(request, runtime);
}

model UploadFileRequest {
  corpId?: string(name='CorpId', example='AFHOFD24HOH77'),
  dataSourceId?: string(name='DataSourceId', example='ds_ddd12345675_1594196239688'),
  fileAliasName?: string(name='FileAliasName', example='example.jpeg'),
  fileContent?: string(name='FileContent', example='AFHGSGJD'),
  fileName?: string(name='FileName', example='example.jpeg'),
  filePath?: string(name='FilePath', example='vcs-dev/pic_algo1344371/12'),
  fileType?: string(name='FileType', example='PIC'),
  MD5?: string(name='MD5', example='08A4415E9D594FF960030B921D42B91E'),
}

model UploadFileResponseBody = {
  code?: string(name='Code', example='200'),
  data?: {
    records?: [ 
      {
        ossPath?: string(name='OssPath', example='vcs-dev/pic_algo1344371/12'),
        sourceId?: string(name='SourceId', description='SourceId', example='dsf_6b241d024dae4963bfc7b218faea58f0'),
      }
    ](name='Records'),
  }(name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='fwer-42faf-faer-4fasdf'),
}

model UploadFileResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UploadFileResponseBody(name='body'),
}

async function uploadFileWithOptions(request: UploadFileRequest, runtime: Util.RuntimeOptions): UploadFileResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.corpId)) {
    body['CorpId'] = request.corpId;
  }
  if (!Util.isUnset(request.dataSourceId)) {
    body['DataSourceId'] = request.dataSourceId;
  }
  if (!Util.isUnset(request.fileAliasName)) {
    body['FileAliasName'] = request.fileAliasName;
  }
  if (!Util.isUnset(request.fileContent)) {
    body['FileContent'] = request.fileContent;
  }
  if (!Util.isUnset(request.fileName)) {
    body['FileName'] = request.fileName;
  }
  if (!Util.isUnset(request.filePath)) {
    body['FilePath'] = request.filePath;
  }
  if (!Util.isUnset(request.fileType)) {
    body['FileType'] = request.fileType;
  }
  if (!Util.isUnset(request.MD5)) {
    body['MD5'] = request.MD5;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UploadFile',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function uploadFile(request: UploadFileRequest): UploadFileResponse {
  var runtime = new Util.RuntimeOptions{};
  return uploadFileWithOptions(request, runtime);
}

model UploadImageRequest {
  imageUrl?: string(name='ImageUrl'),
}

model UploadImageResponseBody = {
  code?: string(name='Code'),
  data?: string(name='Data'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
}

model UploadImageResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UploadImageResponseBody(name='body'),
}

async function uploadImageWithOptions(request: UploadImageRequest, runtime: Util.RuntimeOptions): UploadImageResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.imageUrl)) {
    body['ImageUrl'] = request.imageUrl;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UploadImage',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function uploadImage(request: UploadImageRequest): UploadImageResponse {
  var runtime = new Util.RuntimeOptions{};
  return uploadImageWithOptions(request, runtime);
}

model VerifyDeviceRequest {
  deviceAddress?: string(name='DeviceAddress'),
  filePath?: string(name='FilePath', example='oss://vcs-cloud-oss/1256055756346144/06E868D852.vnd.openxmlformats-officedocument.spreadsheetml.sheet'),
  nvrExisted?: long(name='NvrExisted', example='1'),
}

model VerifyDeviceResponseBody = {
  code?: string(name='Code', example='200'),
  data?: [ 
    {
      code?: string(name='Code', example='200'),
      id?: string(name='Id', example='1'),
      message?: string(name='Message', example='success'),
      originalGbId?: string(name='OriginalGbId', example='33309100991327000908'),
      rowNumber?: long(name='RowNumber', example='1'),
      suggestGbId?: string(name='SuggestGbId', example='33309100991327000001'),
    }
  ](name='Data'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='543F47A7-00A1-5D87-B661-FF6FB2788F10'),
}

model VerifyDeviceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: VerifyDeviceResponseBody(name='body'),
}

async function verifyDeviceWithOptions(request: VerifyDeviceRequest, runtime: Util.RuntimeOptions): VerifyDeviceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceAddress)) {
    body['DeviceAddress'] = request.deviceAddress;
  }
  if (!Util.isUnset(request.filePath)) {
    body['FilePath'] = request.filePath;
  }
  if (!Util.isUnset(request.nvrExisted)) {
    body['NvrExisted'] = request.nvrExisted;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'VerifyDevice',
    version = '2020-05-15',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function verifyDevice(request: VerifyDeviceRequest): VerifyDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  return verifyDeviceWithOptions(request, runtime);
}

